.consumer-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 56px;
}

.consumer-page-shell {
  padding-top: 18px;
}

.consumer-shell::before,
.consumer-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid var(--accent-soft);
  pointer-events: none;
}

.consumer-shell::before {
  top: 112px;
  right: -88px;
  width: 260px;
  height: 260px;
}

.consumer-shell::after {
  top: 420px;
  left: -78px;
  width: 180px;
  height: 180px;
}

.top-rail,
.hero-panel,
.form-panel,
.status-card,
.page-hero,
.page-sidecard {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(247, 243, 237, 0.9);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(18px);
}

.top-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 999px;
}

.rail-brand,
.rail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.surface-language-switches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.rail-brand-link {
  display: grid;
  gap: 4px;
  text-decoration: none;
  color: inherit;
}

.rail-brand-link:hover .rail-label {
  color: var(--accent);
}

.rail-label,
.rail-caption {
  margin: 0;
}

.rail-label,
.page-copy h1,
.page-sidecard h2 {
  font-family: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", "Noto Serif KR", serif;
}

.rail-label {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.rail-caption {
  color: rgba(74, 63, 54, 0.7);
  font-size: 0.82rem;
}

.rail-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  line-height: 1;
}

.page-hero {
  margin-top: 18px;
  padding: 24px;
  border-radius: 30px;
  display: grid;
  gap: 18px;
}

.page-copy {
  display: grid;
  gap: 12px;
}

.page-copy h1,
.page-sidecard h2 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.page-copy h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 0.95;
  max-width: 12ch;
}

.account-hero .page-copy h1 {
  font-size: clamp(2rem, 4.8vw, 3.2rem);
  line-height: 1;
  max-width: 10ch;
}

.account-hero .page-sidecard h2 {
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  line-height: 1.2;
}

.account-snapshot-intro {
  gap: 14px;
  padding: 22px 24px;
}

.account-snapshot-copy {
  gap: 8px;
}

.account-snapshot-copy h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.04;
  max-width: none;
}

.account-snapshot-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.page-summary {
  margin: 0;
  color: var(--ink-muted);
  line-height: 1.72;
}

.mobile-emphasis {
  color: var(--ink-light);
  font-weight: 600;
}

.page-sidecard {
  padding: 20px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(253, 252, 250, 0.95), rgba(237, 229, 216, 0.74));
}

.page-grid {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.site-footer {
  width: min(1120px, calc(100% - 24px));
  margin: 0 auto 28px;
  padding: 18px 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(253, 252, 250, 0.92);
  box-shadow: 0 18px 42px rgba(37, 30, 23, 0.08);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.site-footer__brand {
  display: grid;
  gap: 4px;
  color: var(--ink-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer__links a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

@media (min-width: 960px) {
  .page-hero,
  .page-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    align-items: start;
  }

  .account-snapshot-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .account-snapshot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-snapshot-grid--with-aside {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  }
}

@media (max-width: 719px) {
  .consumer-shell {
    width: min(100% - 18px, 100%);
    padding-top: 14px;
  }

  .top-rail {
    border-radius: 28px;
    align-items: flex-start;
    flex-direction: column;
  }

  .page-hero,
  .page-sidecard {
    border-radius: 24px;
  }

  .site-footer {
    width: min(100% - 18px, 100%);
    border-radius: 22px;
    margin-bottom: 18px;
  }

  .page-copy h1 {
    max-width: none;
    font-size: clamp(2.2rem, 9vw, 3.4rem);
  }

  .account-snapshot-copy h1 {
    font-size: clamp(1.8rem, 8vw, 2.35rem);
  }

  .consumer-page-shell .rail-actions {
    width: 100%;
  }
}

.consumer-app-shell {
  width: min(1440px, calc(100% - 28px));
}

.app-sidebar,
.brief-card,
.intake-section-card,
.compact-follow-up-shell,
.surface-contract {
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.96);
  box-shadow: var(--card-shadow);
}

.app-sidebar {
  position: sticky;
  top: 18px;
  border-radius: 28px;
  padding: 18px;
}

.app-sidebar__inner {
  display: grid;
  gap: 18px;
}

.app-sidebar-brand {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 22px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 238, 232, 0.9));
  transition: border-color 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1), background-color 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.app-sidebar-brand:hover,
.app-sidebar-brand.is-active {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.app-sidebar-brand-mark,
.eyebrow,
.panel-kicker,
.brief-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.app-sidebar-brand-title {
  margin: 0;
  font-family: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-size: 1.9rem;
  line-height: 0.95;
}

.app-sidebar-brand-note {
  color: var(--ink-muted);
  line-height: 1.68;
}

.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;
}

.app-nav-link {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: border-color 220ms cubic-bezier(0.16, 1, 0.3, 1), transform 220ms cubic-bezier(0.16, 1, 0.3, 1), background-color 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.app-nav-link strong {
  color: var(--ink);
  font-size: 1rem;
}

.app-nav-link span:last-child {
  color: var(--ink-muted);
  line-height: 1.58;
}

.app-nav-link:hover,
.app-nav-link.is-active {
  border-color: var(--line-strong);
  background: var(--panel-muted);
  transform: translateY(-1px);
}

.consumer-app-shell {
  position: relative;
  width: min(1120px, calc(100% - 28px));
}

.app-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.app-shell-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(38, 35, 31, 0.18);
  backdrop-filter: blur(4px);
}

.app-shell-header {
  position: sticky;
  top: 14px;
  z-index: 18;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--card-shadow);
}

.app-shell-header__leading,
.app-shell-header__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-shell-header__title {
  display: grid;
  gap: 4px;
}

.app-shell-header__eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.app-shell-header h1 {
  margin: 0;
  font-family: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", serif;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.app-menu-button,
.app-sidebar-close {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-light);
  font: inherit;
  cursor: pointer;
}

.app-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  white-space: nowrap;
}

.app-menu-button__icon {
  display: grid;
  gap: 4px;
}

.app-menu-button__icon span {
  display: block;
  width: 14px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}

.app-sidebar {
  position: fixed;
  top: 12px;
  left: 12px;
  bottom: 12px;
  z-index: 30;
  width: min(340px, calc(100vw - 24px));
  padding: 18px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shell-shadow);
  transform: translateX(calc(-100% - 18px));
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.consumer-app-shell.is-menu-open .app-sidebar {
  transform: translateX(0);
}

.app-sidebar__inner {
  display: grid;
  gap: 16px;
  height: 100%;
  align-content: start;
}

.app-sidebar-brand {
  flex: 1 1 auto;
}

.app-sidebar-close {
  padding: 10px 14px;
}

@media (max-width: 719px) {
  .consumer-shell,
  .consumer-app-shell,
  .site-footer {
    width: min(100% - 18px, 100%);
  }

  .consumer-shell {
    padding-top: 14px;
    padding-bottom: 32px;
  }

  .app-shell-header,
  .app-shell-header__leading {
    align-items: flex-start;
    flex-direction: column;
  }
}
