/*
  Growth Suite: one stylesheet for every page.

  Quiet luxury: warm ivory and deep obsidian, champagne gold used sparingly, a classic serif for headings and
  figures, a clean sans for everything you read or click. Light and dark follow the viewer's system setting.
  Every colour is a token below; change the look by changing them.
*/

:root {
  --bg: #f6f2ea;
  --surface: #fbf8f2;
  --card: #fffdf9;
  --ink: #1c1a16;
  --muted: #6f6859;
  --line: #e7dfce;
  --line-strong: #d6cab0;
  --gold: #8f6f2e;          /* gold as text and links: darker for contrast on ivory */
  --gold-soft: #f3ead7;
  --gold-a: #d3b06a;        /* gold as a fill */
  --gold-b: #b48d41;
  --on-gold: #1f1708;
  --good: #2c6e4d;
  --good-soft: #e3f0e8;
  --warn: #93651a;
  --warn-soft: #f6ecd6;
  --bad: #a3382d;
  --bad-soft: #f6e2de;
  --soft: #f1ebdd;
  --shadow: 0 1px 2px rgba(60, 45, 15, .05), 0 14px 32px -20px rgba(60, 45, 15, .28);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", Georgia, serif;
  --sans: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0c0a;
    --surface: #12110e;
    --card: #181612;
    --ink: #f2ede2;
    --muted: #a69d8b;
    --line: #2a2720;
    --line-strong: #3b3629;
    --gold: #d9b972;
    --gold-soft: #26211500;
    --gold-a: #e3c383;
    --gold-b: #b98f43;
    --on-gold: #1b1307;
    --good: #5fc592;
    --good-soft: #15291f;
    --warn: #e5b564;
    --warn-soft: #2a2213;
    --bad: #f09484;
    --bad-soft: #321a16;
    --soft: #211e17;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 18px 40px -24px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(1100px 420px at 50% -120px, color-mix(in srgb, var(--gold-a) 11%, transparent), transparent 70%);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 15px/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration-color: color-mix(in srgb, var(--gold) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
::selection { background: color-mix(in srgb, var(--gold-a) 40%, transparent); }

/* ---- the frame ---- */

header.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
header.top::after {
  content: ""; display: block; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--gold-a) 55%, transparent), transparent);
  opacity: .55;
}
header.top .in { max-width: 1180px; margin: 0 auto; padding: 13px 28px; display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
header.top .logo {
  display: inline-flex; align-items: center; gap: 11px;
  font: 600 .8rem/1 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
}
header.top .logo .mark {
  width: 15px; height: 15px; transform: rotate(45deg); border-radius: 2px;
  background: linear-gradient(135deg, var(--gold-a), var(--gold-b));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-a) 18%, transparent);
}
header.top nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
header.top nav a {
  color: var(--muted); text-decoration: none; font-size: .88rem; letter-spacing: .02em;
  padding: 6px 12px; border-radius: 999px; transition: color .15s, background .15s;
}
header.top nav a:hover { color: var(--ink); background: var(--soft); }
header.top nav a.here { color: var(--ink); background: var(--soft); }
header.top .tools { display: flex; align-items: center; gap: 14px; }
header.top .who { font-size: .85rem; color: var(--muted); text-decoration: none; }
header.top .who:hover { color: var(--ink); }

main { max-width: 1180px; margin: 0 auto; padding: 38px 28px 90px; }

/* ---- type ---- */

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: .005em; color: var(--ink); }
h1 { font-size: 2.15rem; line-height: 1.15; margin: 0 0 8px; }
h1::after { content: ""; display: block; width: 44px; height: 2px; margin-top: 14px; background: linear-gradient(90deg, var(--gold-a), var(--gold-b)); border-radius: 2px; }
h2 { font-size: 1.28rem; line-height: 1.25; margin: 0 0 12px; }
h3 { font-size: 1.05rem; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 14px 0 28px; font-size: .95rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; color: var(--gold); font-weight: 600; margin: 0 0 8px; }
p { margin: 0 0 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
code { font: .86em/1.4 ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--bad); } .muted { color: var(--muted); }

/* ---- the menu under a client's title ---- */

.subnav { display: flex; flex-wrap: wrap; gap: 4px; margin: -6px 0 30px; padding: 5px; width: fit-content; max-width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.subnav a { color: var(--muted); text-decoration: none; font-size: .86rem; padding: 7px 16px; border-radius: 999px; letter-spacing: .01em; white-space: nowrap; transition: color .15s, background .15s; }
.subnav a:hover { color: var(--ink); background: var(--soft); }
.subnav a.here { color: var(--on-gold); background: linear-gradient(180deg, var(--gold-a), var(--gold-b)); font-weight: 600; }
.name { font: 500 1.1rem/1.3 var(--serif); color: var(--ink); text-decoration: none; }
.name:hover { color: var(--gold); }

/* ---- surfaces ---- */

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; margin-bottom: 22px; box-shadow: var(--shadow);
}
.card > h2:first-child { padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--gold-a), var(--gold-b)); opacity: .75; }
.kpi .n { font: 500 2.1rem/1.1 var(--serif); letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.kpi .l { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; margin-top: 8px; font-weight: 500; }
.kpi .d { font-size: .8rem; margin-top: 2px; }
.flash {
  background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold-a) 55%, var(--line)); border-radius: var(--radius-sm);
  padding: 13px 18px; margin-bottom: 24px; font-size: .94rem;
}
@media (prefers-color-scheme: dark) { .flash { background: color-mix(in srgb, var(--gold-a) 9%, var(--card)); } }
.flash.bad { border-color: var(--bad); background: var(--bad-soft); }
.note {
  border: 1px solid var(--line); border-left: 3px solid var(--gold-a); background: var(--soft);
  padding: 12px 16px; margin: 14px 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .93rem;
}

/* ---- tables ---- */

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .13em; padding-top: 4px; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: color-mix(in srgb, var(--gold-a) 6%, transparent); }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
table.card { padding: 0; }

/* ---- controls ---- */

button, .btn {
  font: 500 .9rem/1.2 var(--sans); letter-spacing: .01em; color: var(--ink);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 10px 20px; cursor: pointer; text-decoration: none; display: inline-block;
  transition: border-color .15s, background .15s, box-shadow .15s, transform .05s;
}
button:hover, .btn:hover { border-color: var(--gold-a); background: color-mix(in srgb, var(--gold-a) 10%, transparent); }
button:active, .btn:active { transform: translateY(1px); }
button:focus-visible, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid color-mix(in srgb, var(--gold-a) 70%, transparent); outline-offset: 2px; }
button.primary, .btn.primary {
  background: linear-gradient(180deg, var(--gold-a), var(--gold-b)); color: var(--on-gold); border-color: var(--gold-b);
  font-weight: 600; box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 8px 18px -10px color-mix(in srgb, var(--gold-b) 90%, black);
}
button.primary:hover, .btn.primary:hover { filter: brightness(1.06); background: linear-gradient(180deg, var(--gold-a), var(--gold-b)); }
button.link { border: 0; background: none; color: var(--gold); padding: 0; border-radius: 0; font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--gold) 35%, transparent); text-underline-offset: 3px; }
button.link:hover { background: none; text-decoration-color: var(--gold); }
button.link.bad { color: var(--bad); text-decoration-color: color-mix(in srgb, var(--bad) 35%, transparent); }
button:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
button:disabled:hover { border-color: var(--line-strong); background: transparent; }

input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 10px 13px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-a) 22%, transparent); }
textarea { min-height: 96px; line-height: 1.5; }
input[type="file"] { padding: 8px 10px; cursor: pointer; }
input[type="file"]::file-selector-button {
  font: 500 .86rem var(--sans); color: var(--ink); background: var(--soft); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 7px 16px; margin-right: 12px; cursor: pointer; transition: border-color .15s, background .15s;
}
input[type="file"]::file-selector-button:hover { border-color: var(--gold-a); background: color-mix(in srgb, var(--gold-a) 12%, transparent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--gold-b); }
label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 14px 0 6px; font-weight: 500; }
.row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.checks label { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: .94rem; text-transform: none; letter-spacing: 0; margin: 9px 0; font-weight: 400; }
.checks input { width: auto; margin-top: 4px; }
.inline { display: inline; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--gold); font-weight: 600; }
details[open] > summary::before { content: "\2212"; }

/* ---- small things ---- */

.pill {
  display: inline-block; border-radius: 999px; padding: 2px 11px; font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .09em; background: var(--soft); color: var(--gold); border: 1px solid var(--line);
}
.pill.ok { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.pill.bad, .pill.attn { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.msg { padding: 11px 16px; border-radius: 18px; margin: 8px 0; max-width: 78%; white-space: pre-wrap; word-wrap: break-word; }
.msg.in { background: var(--soft); border: 1px solid var(--line); margin-right: auto; border-bottom-left-radius: 4px; }
.msg.out { background: linear-gradient(180deg, var(--gold-a), var(--gold-b)); color: var(--on-gold); margin-left: auto; border-bottom-right-radius: 4px; }
.msg small { display: block; opacity: .7; font-size: .72rem; margin-top: 4px; }
.preview { max-width: 300px; width: 100%; border-radius: 18px; background: #000; border: 1px solid var(--line-strong); box-shadow: var(--shadow), 0 0 0 5px color-mix(in srgb, var(--gold-a) 10%, transparent); }
pre.caption { white-space: pre-wrap; word-wrap: break-word; font: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 6px 0; }
.review { border-top: 1px solid var(--line); padding: 18px 0; }
.review:first-of-type { border-top: 0; padding-top: 4px; }
.stars { letter-spacing: 2px; color: var(--gold); }

/* ---- guided steps and platform tiles (connection wizard, setup) ---- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 6px; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 22px 52px; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font: 500 1rem var(--serif); color: var(--gold);
  border: 1px solid var(--gold-a); background: color-mix(in srgb, var(--gold-a) 10%, transparent);
}
.steps > li::after { content: ""; position: absolute; left: 16.5px; top: 40px; bottom: 6px; width: 1px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps h3 { margin: 4px 0 4px; }
.tile-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.tile .head { display: flex; align-items: center; gap: 14px; }
.tile .glyph {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none;
  font: 600 1.15rem var(--serif); color: var(--on-gold); background: linear-gradient(135deg, var(--gold-a), var(--gold-b));
}
.tile .glyph.off { background: var(--soft); color: var(--muted); border: 1px solid var(--line); }
.tile h3 { margin: 0; font-size: 1.12rem; }
.tile .grow { flex: 1; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; padding: 5px 0; font-size: .92rem; }
.checklist li::before { content: "\25CB"; color: var(--muted); flex: none; }
.checklist li.done::before { content: "\2713"; color: var(--good); font-weight: 700; }

/* ---- small screens ---- */

@media (max-width: 720px) {
  header.top .in { padding: 11px 16px; gap: 10px 16px; }
  main { padding: 26px 16px 70px; }
  h1 { font-size: 1.7rem; }
  .card { padding: 20px 18px; border-radius: 14px; }
  .kpi .n { font-size: 1.7rem; }
  .msg { max-width: 92%; }
  .tile-grid { grid-template-columns: 1fr; }
}

@media print {
  header.top, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .kpi { border-color: #ccc; box-shadow: none; }
}
