:root {
  --ink: #26384d;
  --ink-soft: #586879;
  --copper: #b67847;
  --ivory: #f7f3eb;
  --paper: #fffdf9;
  --line: #e9e0d4;
  --success: #4e7865;
  --shadow: 0 24px 80px rgba(38, 56, 77, 0.12);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--ivory); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(182, 120, 71, 0.10), transparent 32rem),
    linear-gradient(135deg, #fbf8f2 0%, #f2ece3 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

.eyebrow {
  margin: 0 0 .55rem;
  color: var(--copper);
  font-size: .76rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.public-page {
  width: min(1240px, calc(100% - 3rem));
  min-height: 100vh;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.public-nav {
  padding: 1.7rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(182, 120, 71, .18);
}

.public-nav-logo {
  width: min(250px, 58vw);
}

.public-nav-label {
  color: var(--ink-soft);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .9rem;
  letter-spacing: .04em;
}

.public-hero {
  min-height: 640px;
  padding: clamp(3rem, 8vw, 7rem) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 7rem);
}

.public-hero-copy {
  max-width: 780px;
}

.public-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 9vw, 7.6rem);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: .9;
}

.public-hero .lead {
  max-width: 610px;
  margin: 1.8rem 0 2.2rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.public-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem 1.5rem;
  flex-wrap: wrap;
}

.public-primary-button {
  padding: 1rem 1.35rem;
  box-shadow: 0 12px 30px rgba(38, 56, 77, .14);
}

.public-primary-button:hover {
  transform: translateY(-1px);
}

.public-actions .privacy-note {
  max-width: 320px;
  margin: 0;
  line-height: 1.45;
}

.public-signature {
  min-height: 360px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    radial-gradient(circle at 72% 18%, rgba(182, 120, 71, .16), transparent 12rem),
    rgba(255, 253, 249, .72);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.public-signature-mark {
  width: 92px;
  height: 92px;
  margin-bottom: auto;
  display: grid;
  place-items: center;
  color: var(--copper);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 26px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  letter-spacing: -.04em;
}

.public-signature-line {
  width: 72px;
  height: 2px;
  margin-bottom: 1.2rem;
  background: var(--copper);
}

.public-signature p {
  margin: 0 0 .45rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
}

.public-signature span {
  max-width: 290px;
  color: var(--ink-soft);
  line-height: 1.55;
}

.public-footer {
  padding: 1.4rem 0 1.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  border-top: 1px solid rgba(182, 120, 71, .18);
  font-size: .8rem;
}

.portal-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar,
.portal-main,
.portal-footer {
  width: min(1180px, calc(100% - 2.4rem));
  margin-inline: auto;
}

.topbar {
  padding: 2rem 0 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.topbar h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.identity-pill {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem .95rem;
  background: rgba(255, 253, 249, .8);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.identity-pill strong,
.identity-pill small { display: block; }

.identity-pill small {
  margin-top: .12rem;
  color: var(--ink-soft);
}

.identity-dot,
.status-light {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(78, 120, 101, .12);
}

.portal-main {
  flex: 1;
  display: grid;
  gap: 2.2rem;
  padding-bottom: 3rem;
}

.hero-panel,
.admin-panel {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  background: rgba(255, 253, 249, .88);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 12px 45px rgba(38, 56, 77, .06);
}

.hero-panel h2,
.admin-panel h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.hero-panel p:not(.eyebrow),
.admin-panel p:not(.eyebrow) {
  max-width: 700px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.hero-status,
.admin-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem .9rem;
  white-space: nowrap;
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 700;
}

.section-heading {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.section-heading h2 { font-size: 2rem; }
.muted { color: var(--ink-soft); font-size: .9rem; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  min-height: 230px;
  padding: 1.4rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 253, 249, .9);
  border: 1px solid var(--line);
  border-radius: 22px;
  text-decoration: none;
  box-shadow: 0 12px 36px rgba(38, 56, 77, .05);
}

.service-card.is-muted {
  opacity: .72;
  cursor: default;
}

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-monogram {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--ink);
  border-radius: 13px;
  font-family: Georgia, serif;
  font-size: 1.35rem;
}

.service-state {
  padding: .4rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
}

.state-available {
  color: var(--success);
  background: rgba(78, 120, 101, .12);
}

.state-coming_soon {
  color: #8f6849;
  background: rgba(182, 120, 71, .12);
}

.service-card h3 {
  margin: 1.7rem 0 .45rem;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
}

.service-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

.service-arrow {
  position: absolute;
  right: 1.4rem;
  bottom: 1.3rem;
  color: var(--copper);
  font-size: 1.25rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

.portal-footer {
  padding: 1.5rem 0 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: .8rem;
}

@media (max-width: 820px) {
  .service-grid { grid-template-columns: 1fr; }

  .topbar,
  .hero-panel,
  .admin-panel,
  .portal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .identity-pill { width: 100%; }
}


/* Identity assets */
.brand-logo {
  display: block;
  max-width: 100%;
  height: auto;
}

.brand-logo-public {
  width: min(520px, 92%);
  margin: 0 auto 1.7rem;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo-header {
  width: 190px;
  flex: 0 0 auto;
}

.identity-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .7rem .9rem;
  color: var(--ink);
  background: rgba(255, 253, 249, .78);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
}

.secondary-button:hover {
  border-color: var(--copper);
}

@media (max-width: 820px) {
  .portal-brand {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo-header {
    width: 160px;
  }

  .identity-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .secondary-button {
    width: 100%;
  }
}


@media (max-width: 820px) {
  .public-page {
    width: min(100% - 2rem, 720px);
  }

  .public-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-nav-label {
    display: none;
  }

  .public-hero {
    min-height: auto;
    padding: 3.2rem 0;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .public-hero h1 {
    font-size: clamp(3.4rem, 17vw, 5.3rem);
  }

  .public-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-signature {
    min-height: 300px;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Read-only administrator monitoring */
.ops-admin-actions {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 1rem;
}
.ops-metric { min-height: 170px; }
.ops-metric h3 { margin: 0 0 .7rem; }
.ops-metric p { line-height: 1.45; }
