/* RYVEN Template Styles */
/* impeccable:style 1 */

/* === Page Layout === */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding: var(--ryven-space-xl) 0;
}

/* === Main Grid Layout === */
.col-span-4 { grid-column: span 4; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

@media (max-width: 1199px) {
  .col-span-4,
  .col-span-8 {
    grid-column: span 8;
  }
}

@media (max-width: 767px) {
  .col-span-4,
  .col-span-8,
  .col-span-12 {
    grid-column: span 4;
  }
}

/* === Account Layout (two-column with fixed sidebar) === */
.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.account-sidebar {
  width: 100%;
  min-width: 0;
}

.account-sidebar > .widget {
  width: 100%;
}

/* === Content Area === */
.content-area {
  /* Keep wide guide tables inside their scroll containers on mobile. */
  min-width: 0;
  min-height: 400px;
}

/* === News Feed === */
.news-item {
  padding: var(--ryven-space-lg);
  border-bottom: none;
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  transition: all var(--ryven-transition-base) var(--ryven-ease-out-quart);
}

.news-item:hover {
  border-color: var(--ryven-border);
  transform: translateY(-2px);
  box-shadow: var(--ryven-shadow-md);
}

.news-item + .news-item {
  margin-top: var(--ryven-space-md);
  border-bottom: none;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: var(--ryven-space-md);
  margin-bottom: var(--ryven-space-sm);
  font-size: var(--ryven-text-xs);
  color: var(--ryven-bone-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.news-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-2xl);
  font-weight: var(--ryven-weight-bold);
  margin-bottom: var(--ryven-space-md);
  color: var(--ryven-bone);
  letter-spacing: 0.02em;
}

.news-title a {
  color: var(--ryven-bone);
  text-decoration: none;
  transition: color var(--ryven-transition-fast);
}

.news-title a:hover {
  color: var(--ryven-relic-emerald);
}

.news-content {
  color: var(--ryven-bone-muted);
  line-height: 1.7;
}

.news-content p {
  margin-bottom: var(--ryven-space-md);
}

/* === Character Page === */
.character-header {
  display: flex;
  align-items: center;
  gap: var(--ryven-space-xl);
  padding: var(--ryven-space-xl);
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  margin-bottom: var(--ryven-space-xl);
}

.character-avatar {
  width: 120px;
  height: 120px;
  border: 2px solid var(--ryven-border-base);
  border-radius: var(--ryven-radius-md);
  overflow: hidden;
  background: var(--ryven-dark-cloth);
  flex-shrink: 0;
}

.character-info h1 {
  font-size: var(--ryven-text-3xl);
  margin-bottom: var(--ryven-space-sm);
  letter-spacing: 0.03em;
}

.character-stats {
  display: flex;
  gap: var(--ryven-space-lg);
  flex-wrap: wrap;
}

.character-stat {
  text-align: center;
}

.character-stat-value {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-2xl);
  font-weight: var(--ryven-weight-bold);
  color: var(--ryven-gold);
}

.character-stat-label {
  font-size: var(--ryven-text-xs);
  color: var(--ryven-bone-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* === Highscores === */
.highscores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--ryven-space-md);
}

.highscore-entry {
  display: flex;
  align-items: center;
  gap: var(--ryven-space-md);
  padding: var(--ryven-space-md);
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  transition: all var(--ryven-transition-fast) var(--ryven-ease-out-quart);
}

.highscore-entry:hover {
  border-color: var(--ryven-border);
  transform: translateX(2px);
}

.highscore-rank {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-xl);
  font-weight: var(--ryven-weight-bold);
  color: var(--ryven-bone-muted);
  min-width: 40px;
  text-align: center;
}

.highscore-rank.top-3 {
  color: var(--ryven-gold);
}

.highscore-name {
  flex: 1;
  font-weight: var(--ryven-weight-medium);
  color: var(--ryven-bone);
}

.highscore-level {
  font-family: var(--ryven-font-display);
  font-weight: var(--ryven-weight-bold);
  color: var(--ryven-relic-emerald);
  font-size: var(--ryven-text-sm);
}

/* === Guild Card === */
.guild-card {
  display: flex;
  align-items: center;
  gap: var(--ryven-space-lg);
  padding: var(--ryven-space-lg);
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  margin-bottom: var(--ryven-space-md);
  transition: all var(--ryven-transition-fast) var(--ryven-ease-out-quart);
}

.guild-card:hover {
  border-color: var(--ryven-border);
  transform: translateX(2px);
}

.guild-logo {
  width: 80px;
  height: 80px;
  border: 2px solid var(--ryven-border-base);
  border-radius: var(--ryven-radius-md);
  overflow: hidden;
  background: var(--ryven-dark-cloth);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.guild-logo img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.guild-info h3 {
  font-size: var(--ryven-text-xl);
  margin-bottom: var(--ryven-space-xs);
}

.guild-info h3 a {
  color: var(--ryven-bone);
  transition: color var(--ryven-transition-fast);
}

.guild-info h3 a:hover {
  color: var(--ryven-relic-emerald);
}

/* === Form Enhancements === */
.form-group {
  margin-bottom: var(--ryven-space-lg);
}

.form-label {
  display: block;
  font-size: var(--ryven-text-sm);
  font-weight: var(--ryven-weight-medium);
  color: var(--ryven-bone);
  margin-bottom: var(--ryven-space-xs);
}

.form-hint {
  font-size: var(--ryven-text-xs);
  color: var(--ryven-bone-muted);
  margin-top: var(--ryven-space-xs);
  line-height: 1.5;
}

.form-error {
  font-size: var(--ryven-text-xs);
  color: #E8697A;
  margin-top: var(--ryven-space-xs);
  font-weight: var(--ryven-weight-medium);
}

/* === Login Widget === */
.login-widget-footer {
  margin-top: var(--ryven-space-md);
  text-align: center;
  display: flex;
  justify-content: center;
  gap: var(--ryven-space-lg);
}

.login-widget-footer .text-small {
  color: var(--ryven-bone-muted);
  font-size: var(--ryven-text-xs);
}

.login-widget-footer .text-small:hover {
  color: var(--ryven-relic-emerald);
}

/* Sidebar login compact fields */
.sidebar-login-field {
  margin-bottom: 14px;
}

.sidebar-login-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ryven-bone-muted);
  letter-spacing: 0.02em;
}

.sidebar-login-input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ryven-border-base);
  border-radius: var(--ryven-radius-md);
  background: var(--ryven-dark-cloth);
  color: var(--ryven-bone);
  font-family: var(--ryven-font-body);
  font-size: var(--ryven-text-sm);
  line-height: 1;
  transition: border-color var(--ryven-transition-fast), box-shadow var(--ryven-transition-fast);
  box-sizing: border-box;
}

.sidebar-login-input::placeholder {
  color: var(--ryven-bone-muted);
  opacity: 0.5;
}

.sidebar-login-input:focus {
  outline: none;
  border-color: var(--ryven-relic-emerald);
  box-shadow: 0 0 0 3px rgba(59, 143, 99, 0.12);
}

.sidebar-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ryven-space-sm);
  width: 100%;
  height: 44px;
  margin-top: 18px;
  padding: 0 var(--ryven-space-lg);
  font-family: var(--ryven-font-body);
  font-size: var(--ryven-text-xs);
  font-weight: var(--ryven-weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ryven-bone);
  background: #254B39;
  border: 1px solid #4E8E6A;
  border-radius: var(--ryven-radius-md);
  cursor: pointer;
  transition: background var(--ryven-transition-fast), border-color var(--ryven-transition-fast), transform var(--ryven-transition-fast);
}

.sidebar-login-btn:hover {
  background: #3F7D5D;
  border-color: #5A9E78;
  transform: translateY(-1px);
}

.sidebar-login-btn:active {
  transform: translateY(0);
  background: #1D3A2D;
}

/* === Login Card === */
.login-card {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 36px 32px 32px;
  background: #111412;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.login-title {
  margin: 0 0 26px;
  font-family: var(--ryven-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ryven-bone);
  letter-spacing: 0.025em;
  text-align: left;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 22px;
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.25);
  border-radius: 8px;
  color: #f0a0a8;
  font-size: 0.85rem;
  line-height: 1.5;
}

.login-alert i {
  margin-top: 2px;
  flex-shrink: 0;
  color: #E8697A;
}

/* Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.login-field {
  margin-bottom: 20px;
}

.login-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  color: #d8d9d4;
}

.login-input {
  display: block;
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: #191c1a;
  color: #f1eee7;
  font-family: var(--ryven-font-body);
  font-size: 16px;
  line-height: 1;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.login-input::placeholder {
  color: rgba(235, 236, 232, 0.42);
}

.login-input:focus {
  outline: none;
  border-color: var(--ryven-relic-emerald);
  box-shadow: 0 0 0 3px rgba(59, 143, 99, 0.18);
}

.login-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f1eee7;
  box-shadow: 0 0 0 1000px #191c1a inset;
  caret-color: #f1eee7;
  transition: background-color 5000s ease-in-out 0s;
}

/* Password field */
.login-password-wrap {
  position: relative;
}

.login-input--password {
  padding-right: 52px;
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--ryven-bone-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.login-password-toggle:hover {
  color: var(--ryven-bone);
  background: rgba(255, 255, 255, 0.06);
}

.login-password-toggle:focus-visible {
  outline: 2px solid var(--ryven-relic-emerald);
  outline-offset: -2px;
}

.login-password-toggle i {
  font-size: 1rem;
  pointer-events: none;
}

/* Utility row */
.login-utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.login-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--ryven-relic-emerald);
  cursor: pointer;
}

.login-remember-text {
  font-size: 0.85rem;
  color: var(--ryven-bone-muted);
}

.login-forgot {
  font-size: 0.85rem;
  color: var(--ryven-relic-emerald);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.login-forgot:hover {
  color: #4ec985;
  text-decoration: underline;
}

.login-forgot:focus-visible {
  outline: 2px solid var(--ryven-relic-emerald);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Submit button */
.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 54px;
  padding: 0 24px;
  border: 1px solid #4E8E6A;
  border-radius: 10px;
  background: #254B39;
  color: var(--ryven-bone);
  font-family: var(--ryven-font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.login-submit:hover {
  background: #3F7D5D;
  border-color: #5A9E78;
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(0);
  background: #1D3A2D;
}

.login-submit:focus-visible {
  outline: 2px solid var(--ryven-relic-emerald);
  outline-offset: 2px;
}

.login-submit:disabled,
.login-submit.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.login-submit-loading {
  display: none;
}

.login-submit.is-loading .login-submit-text {
  display: none;
}

.login-submit.is-loading .login-submit-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Registration link */
.login-register {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ryven-bone-muted);
}

.login-register a {
  color: var(--ryven-relic-emerald);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.login-register a:hover {
  color: #4ec985;
  text-decoration: underline;
}

.login-register a:focus-visible {
  outline: 2px solid var(--ryven-relic-emerald);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 480px) {
  .login-card {
    width: 100%;
    padding: 24px 20px 22px;
    border-radius: 10px;
  }

  .login-input {
    font-size: 16px;
  }

  .login-utility {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* === Alert Messages === */
.alert {
  padding: var(--ryven-space-md) var(--ryven-space-lg);
  border-radius: var(--ryven-radius-md);
  border: 1px solid;
  margin-bottom: var(--ryven-space-lg);
  font-size: var(--ryven-text-sm);
  line-height: 1.6;
}

.alert-success {
  background: rgba(59, 143, 99, 0.08);
  border-color: rgba(59, 143, 99, 0.3);
  color: var(--ryven-relic-emerald);
}

.alert-error {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.3);
  color: #E8697A;
}

.alert-warning {
  background: rgba(199, 176, 106, 0.08);
  border-color: rgba(199, 176, 106, 0.3);
  color: var(--ryven-gold);
}

.alert-info {
  background: rgba(59, 143, 99, 0.06);
  border-color: rgba(59, 143, 99, 0.2);
  color: var(--ryven-relic-emerald);
}

/* === Pagination === */
.pagination {
  display: flex;
  gap: var(--ryven-space-xs);
  justify-content: center;
  margin-top: var(--ryven-space-xl);
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 var(--ryven-space-sm);
  font-size: var(--ryven-text-sm);
  font-weight: var(--ryven-weight-medium);
  color: var(--ryven-bone-muted);
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-sm);
  text-decoration: none;
  transition: all var(--ryven-transition-fast) var(--ryven-ease-out-quart);
}

.pagination a:hover {
  border-color: var(--ryven-relic-emerald);
  color: var(--ryven-relic-emerald);
  transform: translateY(-1px);
}

.pagination .active {
  background: #254B39;
  color: var(--ryven-bone);
  border-color: #4E8E6A;
  font-weight: var(--ryven-weight-semibold);
}

/* === Loading State === */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--ryven-space-2xl);
  color: var(--ryven-bone-muted);
  font-size: var(--ryven-text-sm);
}

.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  margin-left: var(--ryven-space-sm);
  border: 2px solid var(--ryven-border-dim);
  border-top-color: var(--ryven-relic-emerald);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: var(--ryven-space-3xl);
  color: var(--ryven-bone-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: var(--ryven-space-md);
  color: var(--ryven-border-dim);
  opacity: 0.6;
}

.empty-state-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-xl);
  font-weight: var(--ryven-weight-bold);
  color: var(--ryven-bone);
  margin-bottom: var(--ryven-space-sm);
  letter-spacing: 0.02em;
}

.empty-state-text {
  margin-bottom: var(--ryven-space-lg);
  font-size: var(--ryven-text-sm);
  line-height: 1.65;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* === Homepage Feature Cards === */
.feature-card {
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  padding: var(--ryven-space-lg);
  transition: all 280ms var(--ryven-ease-out-quart);
  box-shadow: var(--ryven-shadow-sm);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
  pointer-events: none;
}

.feature-card:hover {
  border-color: var(--ryven-border);
  transform: translateY(-3px);
  box-shadow: var(--ryven-shadow-lg);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ryven-border-base);
  border-radius: var(--ryven-radius-sm);
  color: var(--ryven-relic-emerald);
  font-size: var(--ryven-text-xl);
  margin-bottom: var(--ryven-space-md);
  background: rgba(59, 143, 99, 0.04);
}

.feature-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-lg);
  font-weight: var(--ryven-weight-bold);
  margin-bottom: var(--ryven-space-sm);
  color: var(--ryven-bone);
  letter-spacing: 0.02em;
}

.feature-text {
  font-size: var(--ryven-text-sm);
  color: var(--ryven-bone-muted);
  line-height: 1.65;
}

/* === What is RYVEN === */
.what-is-ryven {
  margin-top: var(--ryven-space-xl);
}

.what-is-ryven-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ryven-space-2xl);
  align-items: center;
  padding: var(--ryven-space-2xl);
  background:
    radial-gradient(ellipse at 10% 40%, rgba(143, 104, 67, 0.08), transparent 50%),
    var(--ryven-shadow-green);
  border: 1px solid var(--ryven-bronze);
  border-radius: var(--ryven-radius-lg);
  overflow: hidden;
  position: relative;
}

.what-is-ryven-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 104, 67, 0.4), transparent);
}

.what-is-ryven-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--ryven-space-sm);
  margin-bottom: var(--ryven-space-lg);
  padding: var(--ryven-space-sm) var(--ryven-space-md);
  background: rgba(59, 143, 99, 0.1);
  border: 1px solid rgba(59, 143, 99, 0.25);
  border-radius: var(--ryven-radius-sm);
  font-size: var(--ryven-text-xs);
  font-weight: var(--ryven-weight-semibold);
  color: var(--ryven-relic-emerald);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.what-is-ryven-badge i {
  font-size: 0.7rem;
}

.what-is-ryven-title {
  margin: 0 0 var(--ryven-space-lg);
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-4xl);
  font-weight: var(--ryven-weight-bold);
  color: var(--ryven-bone);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.what-is-ryven-text {
  margin: 0 0 var(--ryven-space-md);
  font-size: var(--ryven-text-base);
  line-height: 1.7;
  color: var(--ryven-bone-muted);
}

.what-is-ryven-features {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ryven-space-sm);
  margin: var(--ryven-space-lg) 0;
}

.what-is-ryven-feat {
  display: inline-flex;
  align-items: center;
  gap: var(--ryven-space-sm);
  padding: var(--ryven-space-sm) var(--ryven-space-md);
  background: rgba(59, 143, 99, 0.08);
  border: 1px solid rgba(59, 143, 99, 0.2);
  border-radius: var(--ryven-radius-sm);
  font-size: var(--ryven-text-sm);
  color: var(--ryven-bone);
}

.what-is-ryven-feat i {
  color: var(--ryven-relic-emerald);
  font-size: var(--ryven-text-xs);
}

.what-is-ryven-actions {
  display: flex;
  gap: var(--ryven-space-md);
  margin-top: var(--ryven-space-lg);
}

.what-is-ryven-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.what-is-ryven-banner {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.4));
}

@media (max-width: 768px) {
  .what-is-ryven-inner {
    grid-template-columns: 1fr;
    padding: var(--ryven-space-lg);
  }

  .what-is-ryven-title {
    font-size: var(--ryven-text-2xl);
  }

  .what-is-ryven-art {
    order: -1;
  }

  .what-is-ryven-banner {
    max-height: 180px;
  }

  .what-is-ryven-actions {
    flex-direction: column;
  }
}

/* === Wiki Feature Cards === */
.wiki-cards {
  margin-top: var(--ryven-space-xl);
}

.wiki-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.wiki-card {
  display: flex;
  flex-direction: column;
  background: #111412;
  border: 1px solid rgba(190, 205, 192, 0.13);
  border-radius: 13px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.wiki-card *,
.wiki-card *::before,
.wiki-card *::after {
  text-decoration: none;
}

.wiki-card:hover {
  transform: translateY(-3px);
  border-color: rgba(53, 174, 105, 0.55);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.wiki-card__artwork {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0a0d0b;
}

.wiki-card__artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.wiki-card:hover .wiki-card__artwork img {
  transform: scale(1.025);
}

.wiki-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(10, 13, 11, 0.35) 75%,
    rgba(10, 13, 11, 0.9) 100%
  );
  pointer-events: none;
}

.wiki-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--ryven-font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
}

.wiki-card__badge--green {
  background: rgba(59, 143, 99, 0.2);
  border: 1px solid rgba(59, 143, 99, 0.4);
  color: #6fcf97;
}

.wiki-card__badge--bronze {
  background: rgba(143, 104, 67, 0.2);
  border: 1px solid rgba(143, 104, 67, 0.4);
  color: #d4a96a;
}

.wiki-card__badge--gold {
  background: rgba(199, 176, 106, 0.15);
  border: 1px solid rgba(199, 176, 106, 0.35);
  color: #e0cc7a;
}

.wiki-card__badge--red {
  background: rgba(220, 53, 69, 0.18);
  border: 1px solid rgba(220, 53, 69, 0.4);
  color: #f08080;
}

.wiki-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.wiki-card__title {
  margin: 0 0 10px;
  font-family: var(--ryven-font-display);
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  font-weight: var(--ryven-weight-bold);
  color: #E5E1D8;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.wiki-card__desc {
  margin: 0 0 22px;
  font-family: var(--ryven-font-body);
  font-size: 0.9rem;
  line-height: 1.55;
  color: #9B9D99;
  flex: 1;
}

.wiki-card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ryven-font-body);
  font-size: 0.85rem;
  font-weight: var(--ryven-weight-semibold);
  color: #36A968;
  transition: gap 180ms ease, color 180ms ease;
}

.wiki-card:hover .wiki-card__link {
  gap: 11px;
  color: #4ec985;
}

.wiki-card__link i {
  font-size: 0.7rem;
}

@media (min-width: 1700px) {
  .wiki-cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1250px) {
  .wiki-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .wiki-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* === Community CTA === */
.community-cta {
  margin-top: var(--ryven-space-xl);
  background:
    radial-gradient(ellipse at 20% 50%, rgba(59, 143, 99, 0.06), transparent 50%),
    var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  padding: var(--ryven-space-2xl) var(--ryven-space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.community-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ryven-border-base), transparent);
  pointer-events: none;
}

.community-cta-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-2xl);
  font-weight: var(--ryven-weight-bold);
  margin-bottom: var(--ryven-space-sm);
  letter-spacing: 0.03em;
}

.community-cta-text {
  color: var(--ryven-bone-muted);
  max-width: 560px;
  margin: 0 auto var(--ryven-space-lg);
  line-height: 1.65;
}

.community-cta-actions {
  display: flex;
  gap: var(--ryven-space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* === Section Header === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ryven-space-md);
  margin-bottom: var(--ryven-space-lg);
}

.section-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-xl);
  font-weight: var(--ryven-weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ryven-gold);
  position: relative;
  padding-bottom: var(--ryven-space-sm);
  display: flex;
  align-items: center;
  gap: var(--ryven-space-md);
}

.section-title::before,
.section-title::after {
  content: '';
  height: 1px;
  width: 24px;
  background: linear-gradient(90deg, transparent, var(--ryven-border-base));
}

.section-title::after {
  background: linear-gradient(90deg, var(--ryven-border-base), transparent);
}

/* === Ornamental Divider === */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ryven-space-md);
  padding: var(--ryven-space-xl) 0;
  color: var(--ryven-border-base);
  font-size: var(--ryven-text-xs);
  letter-spacing: 0.2em;
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ryven-border-base), transparent);
}

.ornament-diamond {
  width: 8px;
  height: 8px;
  border: 1px solid var(--ryven-border-base);
  transform: rotate(45deg);
  flex-shrink: 0;
}

.ornament-diamond--active {
  background: var(--ryven-relic-emerald);
  border-color: var(--ryven-relic-emerald);
}

/* === Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 20, 0.94);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--ryven-z-modal);
  padding: var(--ryven-space-md);
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-base);
  border-radius: var(--ryven-radius-lg);
  box-shadow: var(--ryven-shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 280ms var(--ryven-ease-out-quart);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--ryven-space-lg);
  border-bottom: 1px solid var(--ryven-border-dim);
}

.modal-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-xl);
  font-weight: var(--ryven-weight-bold);
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--ryven-bone-muted);
  font-size: var(--ryven-text-xl);
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--ryven-relic-emerald);
}

.modal-body {
  padding: var(--ryven-space-lg);
}

.modal-footer {
  display: flex;
  gap: var(--ryven-space-md);
  justify-content: flex-end;
  padding: var(--ryven-space-lg);
  border-top: 1px solid var(--ryven-border-dim);
}

/* === App Card === */
.app-card {
  display: flex;
  align-items: center;
  gap: var(--ryven-space-md);
  padding: var(--ryven-space-md);
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
}

.app-card img {
  width: 80px;
  height: 80px;
  border-radius: var(--ryven-radius-md);
  object-fit: cover;
}

.app-card-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-base);
  font-weight: var(--ryven-weight-bold);
  margin-bottom: var(--ryven-space-xs);
}

.app-card-meta {
  font-size: var(--ryven-text-xs);
  color: var(--ryven-aged-iron);
}

/* === Server Info === */
.server-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--ryven-space-md);
}

.server-info-item {
  display: flex;
  justify-content: space-between;
  padding: var(--ryven-space-md);
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
}

.server-info-label {
  font-size: var(--ryven-text-sm);
  color: var(--ryven-bone-muted);
}

.server-info-value {
  font-weight: var(--ryven-weight-semibold);
  color: var(--ryven-relic-emerald);
  font-variant-numeric: tabular-nums;
}

/* === Account Info Cards === */
.account-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.account-info-card {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(0, 1.2fr);
  column-gap: 20px;
  align-items: start;
  padding: var(--ryven-space-md) var(--ryven-space-lg);
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
}

.account-info-label {
  min-width: 0;
  font-size: var(--ryven-text-sm);
  color: var(--ryven-bone-muted);
}

.account-info-value {
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
  font-weight: var(--ryven-weight-semibold);
  color: var(--ryven-relic-emerald);
  font-variant-numeric: tabular-nums;
}

.account-section-btn {
  margin-top: 20px;
}

.account-actions-row {
  display: flex;
  gap: var(--ryven-space-md);
  flex-wrap: wrap;
  margin-top: var(--ryven-space-md);
}

.account-welcome-text {
  margin-bottom: var(--ryven-space-lg);
}

.account-alert {
  margin-bottom: var(--ryven-space-lg);
}

.account-alert-form {
  margin-top: var(--ryven-space-md);
}

.account-panel + .account-panel {
  margin-top: var(--ryven-space-md);
}

/* === Utility === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Download page === */
.download-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--ryven-space-lg);
}

.download-card {
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  padding: var(--ryven-space-xl);
  text-align: center;
  transition: all var(--ryven-transition-fast) var(--ryven-ease-out-quart);
}

.download-card:hover {
  border-color: var(--ryven-border);
  transform: translateY(-2px);
}

.download-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--ryven-space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--ryven-relic-emerald);
  border: 1px solid var(--ryven-border-base);
  border-radius: var(--ryven-radius-md);
  background: rgba(59, 143, 99, 0.04);
}

.download-card-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-xl);
  margin-bottom: var(--ryven-space-xs);
  letter-spacing: 0.02em;
}

.download-card-meta {
  color: var(--ryven-bone-muted);
  font-size: var(--ryven-text-sm);
  margin-bottom: var(--ryven-space-lg);
  line-height: 1.6;
}

/* === Rules page === */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--ryven-space-md);
}

.rule-card {
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  padding: var(--ryven-space-lg);
}

.rule-card-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-lg);
  margin-bottom: var(--ryven-space-md);
  color: var(--ryven-gold);
  letter-spacing: 0.02em;
}

.rule-card ul {
  padding-left: var(--ryven-space-lg);
  color: var(--ryven-bone-muted);
  font-size: var(--ryven-text-sm);
  line-height: 1.7;
}

.rule-card li {
  margin-bottom: var(--ryven-space-sm);
}

/* === Page tables compact === */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* === Player list widget rows === */
.player-row {
  display: flex;
  align-items: center;
  gap: var(--ryven-space-md);
  padding: var(--ryven-space-sm) 0;
}

.player-row-avatar {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}

/* === Event countdown grid === */
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--ryven-space-sm);
  margin-bottom: var(--ryven-space-md);
}

.countdown-segment {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--ryven-dark-cloth);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-sm);
  padding: var(--ryven-space-sm) 2px;
}

.countdown-segment span {
  font-family: var(--ryven-font-display);
  font-variant-numeric: tabular-nums;
  font-size: var(--ryven-text-xl);
  font-weight: var(--ryven-weight-bold);
  color: var(--ryven-gold);
  line-height: 1;
}

.countdown-segment label {
  margin-top: 4px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ryven-bone-muted);
  font-weight: var(--ryven-weight-medium);
}

/* === Theme-specific overrides === */






/* === Compact Hero === */
.hero--compact {
  min-height: 280px;
  align-items: center;
}

.hero-content--centered {
  margin: 0 auto;
}

.hero-banner--small {
  max-width: 160px;
}

.hero-title--compact {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

/* === Gallery Grid === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--ryven-space-md);
}

.gallery-item {
  background: var(--ryven-dark-cloth);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  overflow: hidden;
  transition: all var(--ryven-transition-fast) var(--ryven-ease-out-quart);
}

.gallery-item:hover {
  border-color: var(--ryven-border);
  transform: translateY(-2px);
}

.gallery-link {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--ryven-ease-out-quart);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.04);
}

.gallery-meta {
  padding: var(--ryven-space-sm) var(--ryven-space-md);
}

.gallery-comment {
  font-size: var(--ryven-text-sm);
  color: var(--ryven-bone);
  display: block;
  margin-bottom: var(--ryven-space-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-actions {
  display: flex;
  gap: var(--ryven-space-xs);
}

/* === Creature Grid === */
.creature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: var(--ryven-space-sm);
}

.creature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--ryven-space-sm);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  text-decoration: none;
  transition: all var(--ryven-transition-fast) var(--ryven-ease-out-quart);
}

.creature-card:hover {
  border-color: var(--ryven-border);
  background: var(--ryven-dark-cloth-hover);
  transform: translateY(-1px);
}

.creature-card--boss {
  border-color: var(--ryven-border-base);
}

.creature-card--boss:hover {
  border-color: var(--ryven-gold);
}

.creature-card-img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}

.creature-card-name {
  margin-top: var(--ryven-space-xs);
  font-size: var(--ryven-text-xs);
  color: var(--ryven-bone-muted);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* === Database Pages Override (rules, downloads, commands) === */
.content-area table,
.content-area .myaac-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ryven-dark-cloth);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  overflow: hidden;
  margin: var(--ryven-space-md) 0;
}

.content-area table td,
.content-area table th,
.content-area .myaac-table td,
.content-area .myaac-table th {
  padding: var(--ryven-space-sm) var(--ryven-space-md);
  border: 1px solid var(--ryven-border-dim);
  color: var(--ryven-bone);
  text-align: left;
}

.content-area table thead td,
.content-area table thead th,
.content-area .myaac-table thead td,
.content-area .myaac-table thead th {
  background: var(--ryven-shadow-green);
  color: var(--ryven-bone);
  font-weight: var(--ryven-weight-semibold);
}

.content-area table tbody tr:nth-child(even),
.content-area .myaac-table tbody tr:nth-child(even) {
  background: var(--ryven-dark-cloth);
}

.content-area table tbody tr:nth-child(odd),
.content-area .myaac-table tbody tr:nth-child(odd) {
  background: var(--ryven-dark-cloth-hover);
}

.content-area b,
.content-area strong {
  color: var(--ryven-bone);
}

.content-area a {
  color: var(--ryven-relic-emerald);
  text-decoration: none;
  transition: color var(--ryven-transition-fast);
}

.content-area a:hover {
  color: var(--ryven-gold);
  text-decoration: underline;
}

.content-area p,
.content-area br {
  color: var(--ryven-bone-muted);
  line-height: 1.7;
}

.content-area h1,
.content-area h2,
.content-area h3 {
  font-family: var(--ryven-font-display);
  color: var(--ryven-bone);
  margin: var(--ryven-space-lg) 0 var(--ryven-space-sm);
}

.content-area img {
  max-width: 100%;
  height: auto;
  border-radius: var(--ryven-radius-sm);
}

/* === Social Proof Section === */
.social-proof {
  padding: var(--ryven-space-2xl) 0;
  text-align: center;
}

.social-proof-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ryven-bone-muted);
  margin-bottom: var(--ryven-space-lg);
}

.social-proof-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ryven-space-xl);
  flex-wrap: wrap;
}

.social-proof-link {
  display: flex;
  align-items: center;
  gap: var(--ryven-space-sm);
  color: var(--ryven-bone-muted);
  text-decoration: none;
  font-size: var(--ryven-text-sm);
  font-weight: var(--ryven-weight-medium);
  transition: color var(--ryven-transition-fast);
  padding: var(--ryven-space-sm) var(--ryven-space-md);
  border-radius: var(--ryven-radius-sm);
}

.social-proof-link:hover {
  color: var(--ryven-relic-emerald);
  background: rgba(59, 143, 99, 0.06);
}

.social-proof-link i {
  font-size: var(--ryven-text-lg);
}

/* === News Cards === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--ryven-space-lg);
}

.news-card {
  background: var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  overflow: hidden;
  transition: all var(--ryven-transition-base) var(--ryven-ease-out-quart);
}

.news-card:hover {
  border-color: var(--ryven-border);
  transform: translateY(-3px);
  box-shadow: var(--ryven-shadow-lg);
}

.news-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--ryven-border-dim);
}

.news-card-body {
  padding: var(--ryven-space-lg);
}

.news-card-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: var(--ryven-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ryven-relic-emerald);
  background: rgba(59, 143, 99, 0.08);
  border: 1px solid rgba(59, 143, 99, 0.2);
  padding: 2px 8px;
  border-radius: var(--ryven-radius-sm);
  margin-bottom: var(--ryven-space-sm);
}

.news-card-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-lg);
  font-weight: var(--ryven-weight-bold);
  color: var(--ryven-bone);
  margin-bottom: var(--ryven-space-sm);
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.news-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ryven-transition-fast);
}

.news-card-title a:hover {
  color: var(--ryven-relic-emerald);
}

.news-card-excerpt {
  font-size: var(--ryven-text-sm);
  color: var(--ryven-bone-muted);
  line-height: 1.65;
  margin-bottom: var(--ryven-space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: var(--ryven-space-sm);
  font-size: 10px;
  color: var(--ryven-aged-iron);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* === Promo Banner === */
.promo-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ryven-space-md);
  padding: var(--ryven-space-sm) var(--ryven-space-lg);
  background: linear-gradient(90deg, rgba(37, 75, 57, 0.15), rgba(59, 143, 99, 0.08), rgba(37, 75, 57, 0.15));
  border-bottom: 1px solid var(--ryven-border-dim);
  font-size: var(--ryven-text-sm);
  color: var(--ryven-bone);
  text-decoration: none;
  transition: background var(--ryven-transition-fast);
  cursor: pointer;
}

.promo-banner:hover {
  background: linear-gradient(90deg, rgba(37, 75, 57, 0.25), rgba(59, 143, 99, 0.12), rgba(37, 75, 57, 0.25));
}

.promo-banner strong {
  color: var(--ryven-relic-emerald);
  font-weight: var(--ryven-weight-semibold);
}

.promo-banner .promo-arrow {
  color: var(--ryven-relic-emerald);
  transition: transform var(--ryven-transition-fast);
}

.promo-banner:hover .promo-arrow {
  transform: translateX(3px);
}

/* === Scroll Reveal Animations === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ryven-ease-out-quart), transform 600ms var(--ryven-ease-out-quart);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* === Ember Particles === */
.ember-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.ember {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ryven-relic-emerald);
  opacity: 0;
  animation: emberFloat linear infinite;
}

.ember:nth-child(1) { left: 15%; animation-duration: 8s; animation-delay: 0s; }
.ember:nth-child(2) { left: 35%; animation-duration: 10s; animation-delay: 1s; }
.ember:nth-child(3) { left: 55%; animation-duration: 7s; animation-delay: 2s; }
.ember:nth-child(4) { left: 75%; animation-duration: 9s; animation-delay: 0.5s; }
.ember:nth-child(5) { left: 90%; animation-duration: 11s; animation-delay: 3s; }
.ember:nth-child(6) { left: 25%; animation-duration: 8.5s; animation-delay: 1.5s; width: 2px; height: 2px; }
.ember:nth-child(7) { left: 65%; animation-duration: 9.5s; animation-delay: 2.5s; width: 2px; height: 2px; }
.ember:nth-child(8) { left: 45%; animation-duration: 7.5s; animation-delay: 0.8s; width: 4px; height: 4px; }

@keyframes emberFloat {
  0% {
    transform: translateY(100%) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
    transform: translateY(80%) translateX(10px) scale(1);
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-20%) translateX(-20px) scale(0);
    opacity: 0;
  }
}

/* === Glow Effects === */
.glow-emerald {
  box-shadow: 0 0 20px rgba(59, 143, 99, 0.08);
}

.glow-emerald:hover {
  box-shadow: 0 0 30px rgba(59, 143, 99, 0.12);
}

.glow-border {
  position: relative;
}

.glow-border::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(59, 143, 99, 0.2), transparent 40%, transparent 60%, rgba(143, 104, 67, 0.2));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--ryven-transition-base);
}

.glow-border:hover::after {
  opacity: 1;
}

/* === Three Steps Section === */
.steps-section {
  padding: var(--ryven-space-3xl) 0;
}

.steps-header {
  text-align: center;
  margin-bottom: var(--ryven-space-2xl);
}

.steps-eyebrow {
  font-size: var(--ryven-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ryven-relic-emerald);
  margin-bottom: var(--ryven-space-sm);
  font-weight: var(--ryven-weight-semibold);
}

.steps-title {
  font-family: var(--ryven-font-display);
  font-size: clamp(1.75rem, 4vw, var(--ryven-text-4xl));
  font-weight: var(--ryven-weight-bold);
  letter-spacing: 0.03em;
  color: var(--ryven-bone);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--ryven-space-lg);
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 48px;
  left: 16.67%;
  right: 16.67%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ryven-border-base), transparent);
  z-index: 0;
}

.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--ryven-space-lg);
  position: relative;
  z-index: 1;
}

.step-number {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-2xl);
  font-weight: var(--ryven-weight-black);
  color: var(--ryven-relic-emerald);
  background: var(--ryven-void-black);
  border: 2px solid var(--ryven-border-base);
  border-radius: 50%;
  margin-bottom: var(--ryven-space-lg);
  transition: all var(--ryven-transition-base) var(--ryven-ease-out-quart);
}

.step-card:hover .step-number {
  border-color: var(--ryven-relic-emerald);
  transform: scale(1.05);
}

.step-title {
  font-family: var(--ryven-font-display);
  font-size: var(--ryven-text-lg);
  font-weight: var(--ryven-weight-bold);
  color: var(--ryven-bone);
  margin-bottom: var(--ryven-space-sm);
  letter-spacing: 0.02em;
}

.step-text {
  font-size: var(--ryven-text-sm);
  color: var(--ryven-bone-muted);
  line-height: 1.65;
  margin-bottom: var(--ryven-space-md);
}

.step-link {
  font-size: var(--ryven-text-sm);
  font-weight: var(--ryven-weight-semibold);
  color: var(--ryven-relic-emerald);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--ryven-space-xs);
  transition: gap var(--ryven-transition-fast);
}

.step-link:hover {
  gap: var(--ryven-space-sm);
}

.step-link i {
  font-size: var(--ryven-text-xs);
}

/* === Final CTA Section === */
.final-cta {
  text-align: center;
  padding: var(--ryven-space-3xl) var(--ryven-space-lg);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(59, 143, 99, 0.04), transparent 60%),
    var(--ryven-shadow-green);
  border: 1px solid var(--ryven-border-dim);
  border-radius: var(--ryven-radius-md);
  margin-top: var(--ryven-space-xl);
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ryven-border-base), transparent);
  pointer-events: none;
}

.final-cta-eyebrow {
  font-size: var(--ryven-text-sm);
  color: var(--ryven-bone-muted);
  margin-bottom: var(--ryven-space-sm);
}

.final-cta-title {
  font-family: var(--ryven-font-display);
  font-size: clamp(1.5rem, 4vw, var(--ryven-text-3xl));
  font-weight: var(--ryven-weight-bold);
  color: var(--ryven-bone);
  margin-bottom: var(--ryven-space-lg);
  letter-spacing: 0.03em;
}

.final-cta-actions {
  display: flex;
  gap: var(--ryven-space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* === Responsive: Three Steps === */
@media (max-width: 767px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--ryven-space-xl);
  }

  .steps-grid::before {
    display: none;
  }

  .step-number {
    width: 60px;
    height: 60px;
    font-size: var(--ryven-text-xl);
  }

  .promo-banner {
    font-size: var(--ryven-text-xs);
    gap: var(--ryven-space-sm);
  }
}
