/* Hosted Site Templates — shared design tokens
   Used by both Basic (free, locked to "ocean") and Advanced (paid, all themes).
   No hardcoded colors anywhere — components consume variables only. */

/* ─────────── Theme palettes ─────────── */
:root,
[data-theme="ocean"] {
  --bg:        #ffffff;
  --surface:   #f8fafc;
  --surface-2: #eef2f7;
  --ink:       #0b1220;
  --ink-2:     #2b3648;
  --muted:     #6b7589;
  --line:      #e3e8ef;
  --line-2:    #cdd5e0;
  --accent:    #1e62fa;
  --accent-2:  #1545c4;
  --accent-soft: rgba(30, 98, 250, 0.08);
}

[data-theme="sunset"] {
  --bg:        #fff8f5;
  --surface:   #fff1e9;
  --surface-2: #ffe4d6;
  --ink:       #1a0e0a;
  --ink-2:     #3b261c;
  --muted:     #8a6a5e;
  --line:      #f3dccd;
  --line-2:    #e8c0a8;
  --accent:    #e85d04;
  --accent-2:  #b04400;
  --accent-soft: rgba(232, 93, 4, 0.08);
}

[data-theme="forest"] {
  --bg:        #faf9f4;
  --surface:   #f3f1e9;
  --surface-2: #e9e6d8;
  --ink:       #0e1a14;
  --ink-2:     #29362e;
  --muted:     #6e7a72;
  --line:      #ddd9cb;
  --line-2:    #c4bfae;
  --accent:    #1f7a4f;
  --accent-2:  #14583a;
  --accent-soft: rgba(31, 122, 79, 0.08);
}

[data-theme="midnight"] {
  --bg:        #0b0e13;
  --surface:   #11151c;
  --surface-2: #181d27;
  --ink:       #e7eaf0;
  --ink-2:     #b9bfcc;
  --muted:     #79808f;
  --line:      #232936;
  --line-2:    #313947;
  --accent:    #7aa2ff;
  --accent-2:  #5e87f0;
  --accent-soft: rgba(122, 162, 255, 0.12);
}

[data-theme="lavender"] {
  --bg:        #fafaff;
  --surface:   #f3f2fb;
  --surface-2: #e8e6f5;
  --ink:       #1a1530;
  --ink-2:     #2f2950;
  --muted:     #7c7593;
  --line:      #e0deec;
  --line-2:    #c8c4dd;
  --accent:    #7c5dff;
  --accent-2:  #5d3ee0;
  --accent-soft: rgba(124, 93, 255, 0.08);
}

[data-theme="graphite"] {
  --bg:        #1a1916;
  --surface:   #21201d;
  --surface-2: #2a2925;
  --ink:       #f5f1e8;
  --ink-2:     #d4cebd;
  --muted:     #8f8a7c;
  --line:      #2f2e2a;
  --line-2:    #3d3b35;
  --accent:    #d4a85a;
  --accent-2:  #e8c177;
  --accent-soft: rgba(212, 168, 90, 0.14);
}

[data-theme="citrus"] {
  --bg:        #fffdf2;
  --surface:   #fff8d9;
  --surface-2: #fef0bd;
  --ink:       #1f2010;
  --ink-2:     #3a3a18;
  --muted:     #7a7a4a;
  --line:      #ece5b6;
  --line-2:    #d8cf90;
  --accent:    #84cc16;
  --accent-2:  #65a30d;
  --accent-soft: rgba(132, 204, 22, 0.12);
}

/* ─────────── Resets, base ─────────── */
.hsite *,
.hsite *::before,
.hsite *::after {
  box-sizing: border-box;
}

.hsite {
  --serif: Georgia, "Iowan Old Style", "Apple Garamond", Cambria, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.hsite a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color 120ms ease, color 120ms ease;
}
.hsite a:hover {
  border-bottom-color: var(--accent);
}

.hsite h1,
.hsite h2,
.hsite h3,
.hsite h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.4em;
  line-height: 1.2;
}
.hsite h1 { font-size: 40px; line-height: 1.12; letter-spacing: -0.025em; }
.hsite h2 { font-size: 22px; margin-top: 1.6em; }
.hsite h3 { font-size: 17px; margin-top: 1.4em; }
.hsite h4 { font-size: 15px; margin-top: 1.2em; }
.hsite p { margin: 0 0 1.1em; max-width: 720px; }
.hsite ul, .hsite ol { padding-left: 1.4em; margin: 0 0 1.1em; max-width: 720px; }
.hsite li { margin-bottom: 0.4em; }
.hsite blockquote {
  margin: 1.4em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  color: var(--ink-2);
  font-style: italic;
}
.hsite code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink-2);
}

/* ─────────── Header ─────────── */
.hsite-header {
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hsite-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.hsite-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  border-bottom: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hsite-brand-mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}
.hsite-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}
.hsite-nav a {
  color: var(--ink-2);
  border-bottom: 0;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.hsite-nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.hsite-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ─────────── Reading progress (advanced) ─────────── */
.hsite-progress {
  position: sticky;
  top: 0;
  height: 2px;
  background: transparent;
  z-index: 11;
  pointer-events: none;
}
.hsite-progress::before {
  content: '';
  position: absolute;
  inset: 0 0 0 0;
  background: var(--accent);
  width: var(--progress, 0%);
  transition: width 80ms linear;
}

/* ─────────── Container ─────────── */
.hsite-main {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 28px 72px;
  flex: 1 0 auto;
}

/* ─────────── Root page ─────────── */
.hsite-root {
  text-align: left;
}
.hsite-root .identity {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 30px;
}
.hsite-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--ink) 4%, transparent),
    0 12px 24px -16px color-mix(in srgb, var(--ink) 30%, transparent);
}
.hsite-icon-monogram {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  color: var(--accent);
}
.hsite-tagline {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 18px;
  font-style: italic;
  font-family: var(--serif);
}

.hsite-root h1 { margin: 0; }

.hsite-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 24px;
}
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 11px;
  border-bottom: 0;
  text-decoration: none;
  transition: transform 120ms ease;
}
.appstore-badge:hover { transform: translateY(-1px); border-bottom-color: transparent; }
.appstore-badge .ab-l { font-size: 10px; opacity: 0.85; line-height: 1; letter-spacing: 0.01em; }
.appstore-badge .ab-b { font-family: var(--sans); font-size: 18px; font-weight: 500; line-height: 1.1; margin-top: 2px; letter-spacing: -0.01em; }
.appstore-badge svg { fill: currentColor; }

.hsite-link-list {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  border-top: 1px solid var(--line);
}
.hsite-link-list li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.hsite-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  color: var(--ink);
  font-size: 17px;
  font-family: var(--serif);
  border-bottom: 0;
}
.hsite-link-list a:hover { color: var(--accent); }
.hsite-link-list .arrow {
  font-size: 18px;
  color: var(--muted);
  transition: transform 120ms ease, color 120ms ease;
}
.hsite-link-list a:hover .arrow { transform: translateX(4px); color: var(--accent); }

/* ─────────── Optional sections (advanced root) ─────────── */
.hsite-section {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.hsite-section h2 {
  margin-top: 0;
}
.hsite-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.hsite-features li {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 12px;
  font-size: 16px;
  margin-bottom: 0;
}
.hsite-features .check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-top: 2px;
  font-size: 12px;
}

/* ─────────── Document layout (privacy / terms) ─────────── */
.hsite-doc {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.hsite-doc.with-toc {
  grid-template-columns: 1fr 220px;
  gap: 56px;
}
@media (max-width: 1023px) {
  .hsite-doc.with-toc { grid-template-columns: 1fr; gap: 32px; }
  .hsite-toc-aside { display: none; }
}

.hsite-doc-back {
  font-size: 13px;
  font-family: var(--mono);
  color: var(--muted);
  border-bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
.hsite-doc-back:hover { color: var(--accent); }

.hsite-doc h1 { margin-bottom: 4px; }
.hsite-doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin: 16px 0 36px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.hsite-doc-meta .item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hsite-doc-meta .k {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.hsite-doc-meta .v { color: var(--ink); font-weight: 500; }
.hsite-doc-meta .v.contact { color: var(--accent); }

.hsite-doc-actions {
  position: absolute;
  top: 0; right: 0;
  display: flex;
  gap: 8px;
}
.hsite-doc-relative { position: relative; }
.hsite-print-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--mono);
  cursor: pointer;
  transition: all 120ms ease;
}
.hsite-print-btn:hover { color: var(--accent); border-color: var(--accent); }

/* Inline TOC (basic, top-of-doc) */
.hsite-inline-toc {
  margin: 0 0 32px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.hsite-inline-toc-h {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 8px;
}
.hsite-inline-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
  counter-reset: toc;
}
.hsite-inline-toc li {
  counter-increment: toc;
  margin: 0;
  font-size: 14px;
}
.hsite-inline-toc li::before {
  content: counter(toc, decimal-leading-zero) ' · ';
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.hsite-inline-toc a { border-bottom: 0; color: var(--ink-2); }
.hsite-inline-toc a:hover { color: var(--accent); }
.hsite-inline-toc a.active,
.hsite-inline-toc a[aria-current="true"] {
  color: var(--accent);
  font-weight: 600;
}

/* Sidebar TOC (advanced, sticky) */
.hsite-toc-aside {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.hsite-toc-aside-h {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 4px 0 12px;
}
.hsite-toc-aside ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}
.hsite-toc-aside li { margin: 0; }
.hsite-toc-aside a {
  display: block;
  padding: 4px 0;
  color: var(--muted);
  border-bottom: 0;
  font-size: 13px;
  line-height: 1.45;
}
.hsite-toc-aside a:hover { color: var(--ink-2); }
.hsite-toc-aside a.active,
.hsite-toc-aside a[aria-current="true"] {
  color: var(--accent);
  font-weight: 500;
  position: relative;
}
.hsite-toc-aside a.active::before,
.hsite-toc-aside a[aria-current="true"]::before {
  content: '';
  position: absolute;
  left: -21px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--accent);
}

/* ─────────── Contact form (advanced) ─────────── */
.hsite-contact-grid {
  max-width: 540px;
}
.hsite-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}
.hsite-form .field {
  display: grid;
  gap: 6px;
}
.hsite-form label {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.hsite-form input,
.hsite-form textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--ink);
  font-family: var(--sans);
  transition: border-color 120ms ease, background 120ms ease;
  font-feature-settings: 'tnum';
}
.hsite-form input:focus,
.hsite-form textarea:focus {
  outline: 0;
  border-color: var(--accent);
  background: var(--bg);
}
.hsite-form textarea { min-height: 120px; resize: vertical; }
.hsite-form .field-errors {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  font-family: var(--mono);
  color: #c0392b;
}
.hsite-form .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--bg);
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: filter 120ms ease, transform 120ms ease;
  justify-self: start;
}
.hsite-form .submit:hover { filter: brightness(0.95); transform: translateY(-1px); }
.hsite-fallback {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
}
.hsite-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Contact success state */
.hsite-thanks {
  padding: 32px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  text-align: center;
  background: var(--surface);
  margin-top: 28px;
}
.hsite-thanks .check {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 22px;
}
.hsite-thanks h2 { margin: 0 0 8px; }
.hsite-thanks p { margin: 0 auto; }

/* ─────────── 404 (free contact) ─────────── */
.hsite-404 {
  text-align: center;
  padding: 80px 28px;
  max-width: 540px;
  margin: 0 auto;
}
.hsite-404 .glyph {
  font-family: var(--serif);
  font-size: 96px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 8px;
  font-style: italic;
}
.hsite-404 h1 { font-size: 28px; }
.hsite-404 p { margin: 0 auto 0; color: var(--ink-2); }

/* ─────────── Footer ─────────── */
.hsite-footer {
  margin-top: auto;
  padding: 28px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
}
.hsite-footer .made { color: var(--ink-2); }
.hsite-footer .gen {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}
.hsite-footer a {
  color: var(--muted);
  border-bottom: 0;
}
.hsite-footer a:hover { color: var(--ink-2); }

/* ─────────── V2 · Identity Card (buttons-first) ─────────── */
.root-card .card-main {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding-top: 32px;
  padding-bottom: 56px;
}
.root-card .idc-frame--btns {
  width: 100%;
  max-width: 880px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 56px;
  display: grid;
  gap: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--ink) 30%, transparent);
}
.root-card .idc-frame--btns::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 300px at 100% 0%, var(--accent-soft), transparent 60%),
    radial-gradient(600px 240px at 0% 100%, var(--accent-soft), transparent 60%);
  pointer-events: none;
}

/* Identity row */
.root-card .idc-id {
  display: flex;
  align-items: center;
  gap: 22px;
  position: relative;
}
.root-card .idc-id-text { display: grid; gap: 8px; }
.root-card .idc-icon {
  position: relative;
  width: 88px; height: 88px;
  border-radius: 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 16px 30px -20px color-mix(in srgb, var(--accent) 50%, transparent);
}
.root-card .idc-icon-glow {
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), transparent 60%);
  opacity: 0.15;
  pointer-events: none;
}
.root-card .idc-mono {
  font-family: var(--serif);
  font-size: 50px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.root-card .idc-name {
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
}
.root-card .idc-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--ink-2);
  margin: 0;
  max-width: none;
}

/* Free-tier name treatment — bigger because identity row collapses to just the name */
.root-card .idc-free .idc-name { font-size: 56px; }

.root-card .idc-cta { position: relative; }

/* Buttons — the hero */
.root-card .idc-btns {
  position: relative;
  display: grid;
  gap: 12px;
}
.root-card .idc-btns--3 { grid-template-columns: repeat(3, 1fr); }
.root-card .idc-btns--2 { grid-template-columns: repeat(2, 1fr); }
.root-card .idc-btn {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 12px;
  padding: 22px 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: border-color 140ms ease, transform 200ms cubic-bezier(.2,.8,.2,1), box-shadow 200ms ease, background 140ms ease;
  min-height: 96px;
  align-content: end;
}
.root-card .idc-btn:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: var(--bg);
  box-shadow:
    0 0 0 4px var(--accent-soft),
    0 18px 30px -20px color-mix(in srgb, var(--accent) 45%, transparent);
}
.root-card .idc-btn-label {
  grid-column: 1; grid-row: 1;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ink);
}
.root-card .idc-btn-sub {
  grid-column: 1; grid-row: 2;
  font-size: 13px;
  color: var(--muted);
}
.root-card .idc-btn-arr {
  grid-column: 2; grid-row: 1 / span 2;
  font-size: 22px;
  color: var(--muted);
  transition: transform 200ms cubic-bezier(.2,.8,.2,1), color 140ms ease;
}
.root-card .idc-btn:hover .idc-btn-arr { transform: translateX(6px); color: var(--accent); }

/* Meta row */
.root-card .idc-meta-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 4px;
}
.root-card .idc-meta-row .idc-dot { color: var(--line-2); }
.root-card .idc-meta-row a { color: var(--muted); border-bottom: 0; }
.root-card .idc-meta-row a:hover { color: var(--accent); }

@media (max-width: 720px) {
  .root-card .idc-frame--btns { padding: 32px 24px; gap: 28px; }
  .root-card .idc-name { font-size: 36px; }
  .root-card .idc-free .idc-name { font-size: 40px; }
  .root-card .idc-btns--3, .root-card .idc-btns--2 { grid-template-columns: 1fr; }
  .root-card .idc-icon { width: 64px; height: 64px; border-radius: 16px; }
  .root-card .idc-mono { font-size: 36px; }
}

/* ─────────── Card · Mobile (full-bleed, no decorative frame) ─────────── */
.root-card-m { background: var(--bg); }
.root-card-m .mcard-main {
  padding: 28px 20px 32px;
  max-width: none;
  display: grid;
  gap: 28px;
}
.root-card-m .mcard-id {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 14px;
  padding: 32px 8px 12px;
}
.root-card-m .mcard-icon {
  width: 88px; height: 88px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  box-shadow: 0 16px 30px -20px color-mix(in srgb, var(--accent) 50%, transparent);
}
.root-card-m .mcard-mono {
  font-family: var(--serif);
  font-size: 50px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}
.root-card-m .mcard-name {
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 600;
}
.root-card-m.idc-free .mcard-name { font-size: 44px; }
.root-card-m .mcard-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-2);
  margin: 0;
  max-width: 280px;
}
.root-card-m .mcard-cta { margin-top: 4px; }

.root-card-m .mcard-btns {
  display: grid;
  gap: 10px;
}
.root-card-m .mcard-btn {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 18px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: border-color 140ms ease, background 140ms ease;
  align-content: center;
  min-height: 76px;
}
.root-card-m .mcard-btn:active { border-color: var(--accent); background: var(--bg); }
.root-card-m .mcard-btn-label {
  grid-column: 1; grid-row: 1;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.root-card-m .mcard-btn-sub {
  grid-column: 1; grid-row: 2;
  font-size: 13px;
  color: var(--muted);
}
.root-card-m .mcard-btn-arr {
  grid-column: 2; grid-row: 1 / span 2;
  font-size: 20px;
  color: var(--muted);
  align-self: center;
}

.root-card-m .mcard-meta {
  display: grid;
  justify-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: center;
  padding-top: 8px;
}
.root-card-m .mcard-meta a { color: var(--muted); border-bottom: 0; }

/* ─────────── Body chrome (around .hsite) ─────────── */
.hsite-body {
  margin: 0;
  background: var(--bg);
}

/* ─────────── Responsive ─────────── */
@media (max-width: 640px) {
  .hsite-main { padding: 36px 22px 56px; }
  .hsite h1 { font-size: 30px; }
  .hsite-root .identity { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hsite-icon { width: 72px; height: 72px; border-radius: 16px; }
  .hsite-icon-monogram { font-size: 30px; }
  .hsite-nav { gap: 14px; font-size: 13px; }
}

/* ─────────── Print ─────────── */
@media print {
  .hsite-header, .hsite-progress, .hsite-toc-aside, .hsite-doc-actions, .hsite-footer { display: none !important; }
  .hsite-main { padding: 0; }
  .hsite { background: white; color: black; }
  .hsite-doc.with-toc { grid-template-columns: 1fr; }
}
