/*
 * Structured Hardening Project
 * Public website visual system
 *
 * Design intent:
 * technical standard + engineering documentation + certification authority
 */

:root {
  --page: #0c1015;
  --surface: #11171e;
  --surface-raised: #151c24;
  --surface-subtle: #0f141a;

  --text: #f1f4f6;
  --text-secondary: #b7c0c9;
  --text-muted: #7f8b96;

  --line: #27313b;
  --line-strong: #3a4652;

  --accent: #8ebce6;
  --accent-strong: #b7d7f3;
  --accent-surface: #13202c;

  --success: #8bc7a3;
  --danger: #e1a0a0;

  --shell: 1240px;
  --reading: 780px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --sans:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  --mono:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    Menlo,
    monospace;
}

/* ---------- Foundation ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

::selection {
  background: var(--accent);
  color: var(--page);
}

.shell {
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-main {
  min-height: 65vh;
}

/* ---------- Accessibility ---------- */

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.65rem 0.9rem;
  background: var(--text);
  color: var(--page);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 16, 21, 0.96);
  border-bottom: 1px solid var(--line);
}

.header-shell {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.site-identity {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  flex: 0 0 auto;
  color: var(--text);
  text-decoration: none;
}

.identity-mark {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding-right: 0.9rem;
  border-right: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.identity-name {
  max-width: 12rem;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0.025em;
}

.header-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem;
  min-width: 0;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-link {
  position: relative;
  padding: 0.7rem 0.6rem;
  color: var(--text-secondary);
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0.6rem;
  bottom: 0.25rem;
  left: 0.6rem;
  height: 1px;
  background: transparent;
}

.nav-link.is-active {
  color: var(--text);
}

.nav-link.is-active::after {
  background: var(--accent);
}

.header-action {
  flex: 0 0 auto;
  padding: 0.62rem 0.9rem;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.header-action:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* ---------- Document header ---------- */

.document-header {
  max-width: 920px;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.document-kicker,
.section-label {
  margin: 0 0 1rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.document-header h1 {
  max-width: 18ch;
  margin: 0;
  color: var(--text);
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 720;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.document-lead {
  max-width: 68ch;
  margin: 1.5rem 0 0;
  color: var(--text-secondary);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.65;
}

/* ---------- Document content ---------- */

.document-content {
  width: min(100%, var(--reading));
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 7rem);
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.document-content > :first-child {
  margin-top: 0;
}

.document-content > :last-child {
  margin-bottom: 0;
}

.document-content h2,
.document-content h3,
.document-content h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.document-content h2 {
  margin: 4.5rem 0 1.35rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.8rem, 3vw, 2.3rem);
}

.document-content h3 {
  margin: 2.75rem 0 1rem;
  font-size: 1.35rem;
}

.document-content h4 {
  margin: 2rem 0 0.8rem;
  font-size: 1.08rem;
}

.document-content p,
.document-content ul,
.document-content ol,
.document-content blockquote,
.document-content pre,
.document-content table,
.document-content figure {
  margin-top: 0;
  margin-bottom: 1.55rem;
}

.document-content ul,
.document-content ol {
  padding-left: 1.6rem;
}

.document-content li {
  margin: 0.55rem 0;
  padding-left: 0.25rem;
}

.document-content li::marker {
  color: var(--text-muted);
}

.document-content strong {
  color: var(--text);
  font-weight: 700;
}

.document-content a {
  color: var(--accent-strong);
  text-decoration-color: rgba(183, 215, 243, 0.45);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.document-content a:hover {
  color: var(--text);
  text-decoration-color: var(--accent);
}

/* ---------- Technical text ---------- */

code,
kbd,
samp {
  font-family: var(--mono);
}

.document-content :not(pre) > code {
  padding: 0.12em 0.32em;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent-strong);
  font-size: 0.88em;
}

.document-content pre {
  overflow-x: auto;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  color: #d7dee5;
  font-size: 0.88rem;
  line-height: 1.6;
}

.document-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

/* ---------- Quotations and notices ---------- */

.document-content blockquote {
  margin-left: 0;
  padding: 0.15rem 0 0.15rem 1.25rem;
  border-left: 2px solid var(--accent);
  color: var(--text-secondary);
}

.document-content blockquote > :last-child {
  margin-bottom: 0;
}

.notice {
  margin: 2rem 0;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  background: var(--surface-subtle);
  color: var(--text-secondary);
}

.notice strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- Tables ---------- */

.document-content table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  font-size: 0.92rem;
}

.document-content th,
.document-content td {
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.document-content th {
  color: var(--text);
  background: var(--surface);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.document-content tr:last-child td {
  border-bottom: 0;
}

/* ---------- Figures ---------- */

.document-content figure {
  margin-inline: 0;
}

.document-content .technical-figure {
  width: 100%;
  margin: 2.25rem 0;
}

.document-content .technical-figure img {
  width: 100%;
}

.document-content img {
  height: auto;
  border: 1px solid var(--line);
  background: var(--surface-subtle);
}

.document-content figcaption {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.5;
}

/* ---------- Section indexes ---------- */

.document-index {
  padding: 0 0 clamp(4rem, 8vw, 7rem);
}

.section-heading {
  max-width: var(--reading);
  margin-bottom: 1.75rem;
}

.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.index-entry {
  min-width: 0;
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.index-entry:nth-child(odd) {
  padding-right: 2rem;
  border-right: 1px solid var(--line);
}

.index-entry:nth-child(even) {
  padding-left: 2rem;
}

.index-entry h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.index-entry h3 a {
  color: var(--text);
  text-decoration: none;
}

.index-entry h3 a:hover {
  color: var(--accent-strong);
}

.index-entry p {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-subtle);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 3rem 5rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.footer-identity strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.footer-identity p {
  max-width: 38rem;
  margin: 0.6rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.5rem;
  align-content: start;
}

.footer-nav a,
.footer-meta a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-nav a {
  font-size: 0.84rem;
}

.footer-nav a:hover,
.footer-meta a:hover {
  color: var(--accent-strong);
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
}

/* ---------- Contact form ---------- */

.contact-form {
  width: min(100%, var(--reading));
  margin: 0 0 clamp(4rem, 8vw, 7rem);
  padding: 2rem 0 0;
  border-top: 1px solid var(--line-strong);
}

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

.field {
  display: block;
  margin-bottom: 1.25rem;
}

.label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.input,
.textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface-subtle);
  color: var(--text);
  padding: 0.8rem 0.9rem;
  outline: none;
}

.input:hover,
.textarea:hover {
  border-color: #536171;
}

.input:focus,
.textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.textarea {
  min-height: 12rem;
  resize: vertical;
}

.hint {
  display: block;
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.turnstile {
  min-height: 65px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--page);
}

.btn-primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.form-status {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.form-status:empty {
  margin-top: 0;
  min-height: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .header-shell {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 1rem;
    padding-bottom: 0.85rem;
  }

  .header-navigation {
    width: 100%;
    justify-content: space-between;
    gap: 1rem;
  }

  .primary-nav {
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }

  .nav-link {
    padding-left: 0;
    padding-right: 1rem;
  }

  .nav-link::after {
    right: 1rem;
    left: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 1.15rem;
  }

  .site-header {
    position: relative;
  }

  .header-shell {
    min-height: 0;
    padding-top: 1rem;
    padding-bottom: 0.75rem;
    align-items: stretch;
    flex-direction: column;
    gap: 0.75rem;
  }

  .identity-name {
    max-width: none;
  }

  .header-navigation {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    min-width: 0;
  }

  .primary-nav {
    display: flex;
    flex: 1 1 100%;
    flex-wrap: wrap;
    gap: 0.15rem 0.8rem;
    min-width: 0;
    max-width: none;
    margin-right: 0;
    padding-right: 0;
    overflow: visible;
  }

  .nav-link {
    padding: 0.55rem 0;
  }

  .nav-link::after {
    right: 0;
    left: 0;
  }

  .header-action {
    display: inline-flex;
    margin-top: 0.25rem;
    padding: 0.55rem 0.75rem;
  }

  .document-header {
    padding-top: 3rem;
    padding-bottom: 2.5rem;
  }

  .document-header h1 {
    max-width: none;
    font-size: clamp(2.35rem, 12vw, 3.6rem);
  }

  .document-content {
    padding-top: 2.5rem;
  }

  .document-content h2 {
    margin-top: 3rem;
  }

  .index-grid {
    grid-template-columns: 1fr;
  }

  .index-entry,
  .index-entry:nth-child(odd),
  .index-entry:nth-child(even) {
    padding: 1.25rem 0;
    border-right: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .footer-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-meta {
    grid-column: auto;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .identity-name {
    display: none;
  }

  .footer-nav {
    grid-template-columns: 1fr;
  }

  .document-content table {
    font-size: 0.82rem;
  }

  .document-content th,
  .document-content td {
    padding: 0.65rem;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==========================================================================
   SHP Homepage
   ========================================================================== */

.home {
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.home > section,
.home > nav {
  border-bottom: 1px solid var(--line);
}

/* ---------- Homepage hero ---------- */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: clamp(3rem, 7vw, 7rem);
  min-height: min(640px, calc(100vh - 5rem));
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3.5rem, 6vw, 5.5rem);
  align-items: end;
}

.home-hero-main {
  align-self: center;
}

.home-eyebrow,
.home-section-number,
.technical-label {
  margin: 0;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.home-hero h1 {
  max-width: 10ch;
  margin: 1.35rem 0 0;
  color: var(--text);
  font-size: clamp(4rem, 8.5vw, 8rem);
  font-weight: 760;
  line-height: 0.88;
  letter-spacing: -0.065em;
}

.home-summary {
  max-width: 58ch;
  margin: 2.25rem 0 0;
  color: var(--text-secondary);
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  line-height: 1.6;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.25rem;
}

.home-primary-link,
.home-secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.75rem 1rem;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
}

.home-primary-link {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--page);
}

.home-primary-link:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.home-secondary-link {
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.home-secondary-link:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* ---------- Identity panel ---------- */

.home-identity-panel {
  align-self: end;
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-subtle);
}

.identity-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.identity-panel-data {
  margin: 0;
}

.identity-panel-data > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.identity-panel-data dt,
.identity-panel-data dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.4;
}

.identity-panel-data dt {
  color: var(--text-muted);
}

.identity-panel-data dd {
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.home-identity-panel > p {
  margin: 0;
  padding: 1rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}

.home-identity-panel .identity-panel-warning {
  padding-top: 0;
  color: var(--text);
  font-weight: 650;
}

/* ---------- Shared homepage headings ---------- */

.home-section-heading {
  max-width: 760px;
}

.home-section-heading h2 {
  margin: 0.8rem 0 0;
  color: var(--text);
  font-size: clamp(2rem, 4.5vw, 3.75rem);
  font-weight: 720;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.home-section-heading > p:last-child:not(.home-section-number) {
  max-width: 60ch;
  margin: 1.25rem 0 0;
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ---------- Lifecycle ---------- */

.home-system {
  padding: clamp(3.75rem, 6.5vw, 6rem) 0;
}

.lifecycle {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.lifecycle-stage {
  position: relative;
  min-height: 10.5rem;
  padding: 1.1rem;
  border-right: 1px solid var(--line);
}

.lifecycle-stage:last-child {
  border-right: 0;
}

.lifecycle-stage:not(:last-child)::after {
  content: "→";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 0;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--line-strong);
  background: var(--page);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.35rem;
  text-align: center;
  transform: translate(50%, -50%);
}

.lifecycle-number {
  display: block;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.lifecycle-stage strong {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  color: var(--text);
  font-size: clamp(0.9rem, 1.5vw, 1.08rem);
  font-weight: 700;
  line-height: 1.2;
}

/* ---------- Homepage responsive: hero + lifecycle ---------- */

@media (max-width: 980px) {
  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 4rem;
  }

  .home-hero h1 {
    max-width: 9ch;
  }

  .home-identity-panel {
    width: min(100%, 620px);
  }

  .lifecycle {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lifecycle-stage:nth-child(3) {
    border-right: 0;
  }

  .lifecycle-stage:nth-child(3)::after {
    display: none;
  }

  .lifecycle-stage:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .home-hero {
    padding-top: 4rem;
  }

  .home-hero h1 {
    font-size: clamp(3.6rem, 18vw, 5.4rem);
  }

  .home-summary {
    font-size: 1.08rem;
  }

  .lifecycle {
    grid-template-columns: 1fr;
  }

  .lifecycle-stage,
  .lifecycle-stage:nth-child(3) {
    min-height: auto;
    padding: 1rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .lifecycle-stage:last-child {
    border-bottom: 0;
  }

  .lifecycle-stage::after,
  .lifecycle-stage:nth-child(3)::after {
    display: none;
  }

  .lifecycle-stage strong {
    position: static;
    display: block;
    margin-top: 0.45rem;
  }
}

/* ==========================================================================
   SHP Homepage — System Components
   ========================================================================== */

.home-standard,
.home-verification,
.home-certification,
.home-governance,
.home-authority,
.home-specifications,
.home-directory {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.home-prose {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.home-prose p {
  margin: 0 0 1.15rem;
}

.home-prose .home-emphasis {
  color: var(--text);
  font-size: 1.12rem;
  line-height: 1.6;
}

.home-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.home-text-link::after {
  content: "→";
  font-family: var(--mono);
  font-weight: 400;
}

.home-text-link:hover {
  color: var(--text);
}

.technical-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
}


/* ---------- Control model ---------- */

.home-standard-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: clamp(3rem, 8vw, 7rem);
  margin-top: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.control-contract {
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--line-strong);
  background: var(--surface-subtle);
}

.control-contract dl {
  margin: 0;
}

.control-contract dl > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  min-height: 4.6rem;
  border-bottom: 1px solid var(--line);
}

.control-contract dl > div:last-child {
  border-bottom: 0;
}

.control-contract dt,
.control-contract dd {
  margin: 0;
  padding: 1rem;
}

.control-contract dt {
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.control-contract dd {
  display: flex;
  align-items: center;
  color: var(--text);
  font-size: 0.98rem;
}


/* ---------- Verification ---------- */

.verification-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.55fr) minmax(0, 1.45fr);
  gap: 0 clamp(3rem, 7vw, 6rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}

.verification-principle {
  grid-row: span 2;
  padding: 1.25rem 0 0;
  border-top: 2px solid var(--accent);
}

.verification-principle p {
  max-width: 16ch;
  margin: 1.5rem 0 0;
  color: var(--text);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.verification-flow {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) auto
    minmax(0, 1fr) auto
    minmax(0, 1fr) auto
    minmax(0, 1fr);
  align-items: stretch;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.verification-flow > div {
  display: flex;
  min-height: 7rem;
  align-items: flex-end;
  padding: 1rem;
}

.verification-flow > div span {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.06em;
}

.flow-arrow {
  display: flex;
  width: 1.5rem;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-family: var(--mono);
}

.verification-copy {
  max-width: 700px;
  margin-top: 2rem;
}


/* ---------- Certification boundary model ---------- */

.certification-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: clamp(3rem, 7vw, 6rem);
  margin-top: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.certification-state {
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--line-strong);
}

.certification-state dl {
  margin: 0;
}

.certification-state dl > div {
  display: grid;
  grid-template-columns: 9rem 9rem minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.certification-state dl > div:last-child {
  border-bottom: 0;
}

.certification-state dt,
.certification-state dd {
  margin: 0;
  padding: 0.95rem 1rem;
}

.certification-state dt {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
}

.certification-value {
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.certification-description {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.certification-copy {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
}


/* ---------- Platform and tier governance ---------- */

.governance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.governance-grid article {
  display: flex;
  flex-direction: column;
  min-height: 29rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.governance-grid article + article {
  border-left: 1px solid var(--line-strong);
}

.governance-grid h3 {
  max-width: 14ch;
  margin: 1rem 0 2rem;
  color: var(--text);
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.governance-grid article > p:not(.technical-label) {
  max-width: 54ch;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
}

.governance-rule {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--text) !important;
  font-weight: 650;
}

.governance-grid .home-text-link {
  margin-top: 1.5rem;
}


/* ---------- Verification authority vs certification authority ---------- */

.authority-model {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5rem minmax(0, 1fr);
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.authority-side {
  min-height: 25rem;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.authority-status {
  display: inline-block;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.authority-side h3 {
  margin: 2rem 0 1.5rem;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.authority-side p {
  max-width: 48ch;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.authority-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.authority-divider span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 2rem;
}


/* ---------- Specification authority ---------- */

.specification-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(440px, 1.35fr);
  gap: clamp(3rem, 8vw, 7rem);
  margin-top: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.specification-authority {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4rem minmax(0, 1fr);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--line-strong);
}

.specification-authority > div:not(.specification-authority-mark) {
  min-height: 11rem;
  padding: 1.25rem;
}

.specification-authority span {
  display: block;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

.specification-authority strong {
  display: block;
  margin-top: 3rem;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.4;
}

.specification-authority-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.5rem;
}


/* ---------- Project index ---------- */

.home-directory {
  border-bottom: 0 !important;
}

.home-directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--line-strong);
}

.home-directory-grid a {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  min-height: 6rem;
  align-items: end;
  padding: 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}

.home-directory-grid a:nth-child(3n) {
  border-right: 0;
}

.home-directory-grid a span {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.home-directory-grid a strong {
  font-size: 1rem;
  font-weight: 650;
}

.home-directory-grid a:hover {
  background: var(--surface-subtle);
}

.home-directory-grid a:hover strong {
  color: var(--accent-strong);
}


/* ---------- Homepage system responsive ---------- */

@media (max-width: 980px) {
  .home-standard-grid,
  .certification-layout,
  .specification-layout {
    grid-template-columns: 1fr;
  }

  .verification-grid {
    grid-template-columns: 1fr;
  }

  .verification-principle {
    grid-row: auto;
    margin-bottom: 3rem;
  }

  .verification-principle p {
    max-width: 24ch;
  }

  .authority-model {
    grid-template-columns: 1fr;
  }

  .authority-divider {
    min-height: 4rem;
    border: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .authority-side {
    min-height: auto;
  }

  .home-directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-directory-grid a:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .home-directory-grid a:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 720px) {
  .verification-flow {
    grid-template-columns: 1fr;
  }

  .verification-flow > div {
    min-height: auto;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
  }

  .verification-flow > div:last-of-type {
    border-bottom: 0;
  }

  .flow-arrow {
    display: none;
  }

  .certification-state dl > div {
    grid-template-columns: 1fr 1fr;
  }

  .certification-description {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
  }

  .certification-value {
    border-right: 0;
  }

  .governance-grid {
    grid-template-columns: 1fr;
  }

  .governance-grid article {
    min-height: auto;
  }

  .governance-grid article + article {
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

  .governance-rule {
    margin-top: 2rem;
  }

  .specification-authority {
    grid-template-columns: 1fr;
  }

  .specification-authority > div:not(.specification-authority-mark) {
    min-height: auto;
  }

  .specification-authority strong {
    margin-top: 1.5rem;
  }

  .specification-authority-mark {
    min-height: 3rem;
    border: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .control-contract dl > div {
    grid-template-columns: 5.5rem 1fr;
  }

  .control-contract dt,
  .control-contract dd {
    padding: 0.85rem;
  }

  .home-directory-grid {
    grid-template-columns: 1fr;
  }

  .home-directory-grid a,
  .home-directory-grid a:nth-child(2n),
  .home-directory-grid a:nth-child(3n) {
    border-right: 0;
  }
}
