@import url('/brand.css');

:root {
  color-scheme: light;
  --cream: #f3ebdd;
  --paper: #faf5ea;
  --navy: #1b2b3e;
  --ink: #364252;
  --muted: #6f6559;
  --gold: #866437;
  --gold-light: #c9a36a;
  --focus: #8f6d42;
  --line: rgba(27, 43, 62, .14);
  --line-strong: rgba(27, 43, 62, .26);
  --success: #476149;
  --error: #8b3e34;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 124px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
}
button,
input,
select,
textarea { font: inherit; }
input,
select,
textarea { max-width: 100%; }
button,
input[type="range"],
input[type="file"],
select { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}
h1,
h2,
h3 {
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 400;
}

.site-head {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(243, 235, 221, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.site-head-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 82px;
  align-items: center;
  gap: 30px;
}
.brand {
  display: inline-flex;
  align-items: center;
  color: var(--navy);
  text-decoration: none;
}
.brand img { width: 116px; height: auto; }
.site-nav { justify-self: center; }
.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a,
.head-cta {
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  white-space: nowrap;
}
.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 1px;
  background: var(--gold);
  content: '';
  opacity: 0;
  transform: scaleX(.4);
  transition: opacity .2s ease, transform .2s ease;
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}
.head-cta {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  background: var(--navy);
  color: var(--paper);
  white-space: nowrap;
}

.hub-hero,
.tool-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(44px, 7vw, 90px);
  align-items: end;
  padding: 86px 0 70px;
  border-bottom: 1px solid var(--line-strong);
}
.hub-hero h1,
.tool-intro h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(48px, 6.4vw, 78px);
  line-height: 1;
  letter-spacing: -.04em;
}
.hero-copy {
  max-width: 600px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: clamp(17px, 1.7vw, 20px);
}
.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-decoration: none;
  text-transform: uppercase;
}
.back-link::before { margin-right: 9px; content: '\2190'; font-size: 16px; font-weight: 400; }

.promise-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  background: var(--navy);
  color: var(--paper);
  list-style: none;
}
.promise-strip li {
  min-width: 0;
  padding: 26px 30px;
  border-right: 1px solid rgba(250, 245, 234, .16);
}
.promise-strip li:last-child { border-right: 0; }
.promise-strip strong {
  display: block;
  margin-bottom: 5px;
  color: var(--gold-light);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.promise-strip span { color: #d7d1c7; font-size: 14px; }

.tools-list { padding: 68px 0 112px; }
.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 11px;
  font-family: inherit;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.section-heading::after { height: 1px; flex: 1; background: var(--line); content: ''; }
.tool-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.tool-card {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(30px, 4vw, 48px);
  background: var(--paper);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
.tool-card:first-child { background: var(--navy); color: #d7d1c7; }
.tool-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.tool-number {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 22px;
}
.tool-card:first-child .tool-number { color: var(--gold-light); }
.tool-card h2 {
  max-width: 500px;
  margin: auto 0 18px;
  font-size: clamp(37px, 4vw, 52px);
  line-height: 1.04;
}
.tool-card:first-child h2 { color: var(--paper); }
.tool-card p { max-width: 560px; margin: 0; color: var(--muted); }
.tool-card:first-child p { color: #c8c4bd; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.tool-card:first-child .card-link { color: var(--gold-light); }
.card-link::after { content: '\2192'; font-size: 17px; font-weight: 400; }

.privacy-note {
  margin: 28px 0 0;
  padding: 22px 24px;
  background: var(--paper);
  border-left: 3px solid var(--gold);
  color: var(--muted);
  font-size: 14px;
}
.privacy-note strong { color: var(--navy); }

.tool-shell {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr);
  gap: clamp(26px, 4vw, 50px);
  align-items: start;
  padding: 56px 0 110px;
}
.control-panel {
  padding: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.control-panel h2,
.preview-panel h2,
.score-panel h2 { margin: 0; font-size: 30px; line-height: 1.1; }
.panel-intro { margin: 10px 0 24px; color: var(--muted); font-size: 14px; }
.control-group {
  margin: 0;
  padding: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.control-group legend,
.field-label {
  display: block;
  margin-bottom: 9px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
.field { display: block; min-width: 0; margin-bottom: 17px; }
.field:last-child { margin-bottom: 0; }
.field input[type="text"],
.field input[type="file"],
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  background: #fffdf8;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
}
.field input[type="file"] { padding: 8px; font-size: 13px; }
.field input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  padding: 5px 10px;
  background: var(--navy);
  border: 0;
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
}
.field input[type="range"] { width: 100%; accent-color: var(--gold); }
.range-label { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.range-value { color: var(--muted); font-size: 12px; font-weight: 400; }
.field-hint { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.preset-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.preset-option { position: relative; }
.preset-option input { position: absolute; opacity: 0; pointer-events: none; }
.preset-option label {
  display: block;
  min-height: 52px;
  padding: 10px 13px;
  background: #fffdf8;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
}
.preset-option label strong { display: block; color: var(--navy); font-size: 13px; }
.preset-option label span { display: block; color: var(--muted); font-size: 12px; }
.preset-option input:checked + label { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.preset-option input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 3px; }

.preview-panel { min-width: 0; }
.preview-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 18px;
}
.preview-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.canvas-stage {
  display: grid;
  min-height: 540px;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
  overflow: hidden;
  background-color: #111b29;
  background-image: linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.025) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.025) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.025) 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}
#post-canvas {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(70vh, 720px);
  height: auto;
  background: #273548;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .28);
  cursor: grab;
  touch-action: none;
}
#post-canvas.is-dragging { cursor: grabbing; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  background: var(--navy);
  border: 1px solid var(--navy);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}
.button-secondary { background: transparent; color: var(--navy); }
.status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.status[data-kind="success"] { color: var(--success); }
.status[data-kind="error"] { color: var(--error); }

.score-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(310px, .82fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding: 56px 0 110px;
}
.checklist-panel { min-width: 0; }
.checklist-panel > h2 { margin: 0; font-size: clamp(34px, 4vw, 46px); line-height: 1.06; }
.checklist-intro { max-width: 720px; margin: 12px 0 28px; color: var(--muted); }
.check-list { display: grid; gap: 12px; padding: 0; list-style: none; }
.check-item { position: relative; }
.check-item input {
  position: absolute;
  top: 24px;
  left: 22px;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--gold);
}
.check-item label {
  display: block;
  min-height: 76px;
  padding: 17px 20px 17px 60px;
  background: var(--paper);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.check-item label:hover { border-color: var(--gold); }
.check-item input:checked + label { background: #f7f1e5; border-color: rgba(71, 97, 73, .5); }
.check-item input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 3px; }
.check-item strong { display: block; color: var(--navy); font-size: 15px; }
.check-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }

.score-panel {
  position: sticky;
  top: 122px;
  padding: clamp(28px, 4vw, 42px);
  background: var(--navy);
  color: #d7d1c7;
}
.score-panel h2 { color: var(--paper); }
.score-meter {
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  margin: 28px auto 24px;
  background: conic-gradient(var(--gold-light) var(--score-angle, 0deg), rgba(250,245,234,.13) 0);
  border-radius: 50%;
}
.score-meter::before {
  display: block;
  width: 148px;
  height: 148px;
  background: var(--navy);
  border-radius: 50%;
  content: '';
  grid-area: 1 / 1;
}
.score-number { z-index: 1; grid-area: 1 / 1; text-align: center; }
.score-number strong {
  display: block;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 58px;
  font-weight: 400;
  line-height: .9;
}
.score-number span { color: var(--gold-light); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.score-band { margin: 0; color: var(--paper); font-family: var(--font-display); font-size: 25px; text-align: center; }
.score-summary { margin: 8px 0 28px; color: #c8c4bd; font-size: 14px; text-align: center; }
.priority-title {
  margin: 0 0 12px;
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.priority-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: fixes; }
.priority-list li {
  position: relative;
  padding: 13px 12px 13px 42px;
  background: rgba(250, 245, 234, .07);
  color: #e5ded2;
  font-size: 13px;
  counter-increment: fixes;
}
.priority-list li::before {
  position: absolute;
  top: 12px;
  left: 13px;
  color: var(--gold-light);
  content: '0' counter(fixes);
  font-family: var(--font-display);
}
.score-panel .button { width: 100%; margin-top: 28px; background: var(--gold-light); border-color: var(--gold-light); color: #172333; }
.self-check-note { margin: 16px 0 0; color: #aaa9a5; font-size: 12px; }

.site-foot {
  padding: 34px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

@media (max-width: 1000px) {
  .site-head-inner { grid-template-columns: auto 1fr; gap: 8px 24px; padding-top: 10px; }
  .brand img { width: 102px; }
  .head-cta { justify-self: end; }
  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-self: stretch;
    overflow-x: auto;
  }
  .site-nav ul { justify-content: flex-start; gap: 24px; }
  .site-nav a { min-height: 38px; }
  .site-nav a::after { bottom: 5px; }
  .tool-shell { grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); }
  .control-panel { padding: 24px; }
}

@media (max-width: 780px) {
  .wrap { width: min(100% - 32px, 1180px); }
  .hub-hero,
  .tool-intro { grid-template-columns: 1fr; gap: 28px; padding: 58px 0 48px; }
  .hub-hero h1,
  .tool-intro h1 { font-size: clamp(44px, 13vw, 64px); }
  .promise-strip { grid-template-columns: 1fr; }
  .promise-strip li { padding: 19px 22px; border-right: 0; border-bottom: 1px solid rgba(250, 245, 234, .16); }
  .promise-strip li:last-child { border-bottom: 0; }
  .tool-cards { grid-template-columns: 1fr; }
  .tool-card { min-height: 340px; }
  .tool-shell,
  .score-shell { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 78px; }
  .control-panel { order: 2; }
  .preview-panel { order: 1; }
  .canvas-stage { min-height: 420px; padding: 18px; }
  #post-canvas { max-height: 68vh; }
  .score-panel { position: static; }
}

@media (max-width: 520px) {
  html { scroll-padding-top: 132px; }
  .site-head-inner { min-height: 70px; }
  .head-cta { min-height: 40px; padding: 7px 10px; font-size: 10px; letter-spacing: .04em; }
  .site-nav ul { gap: 20px; }
  .site-nav li:nth-last-child(1) { display: none; }
  .tools-list { padding: 48px 0 76px; }
  .tool-card { min-height: 300px; padding: 28px 24px; }
  .control-panel { padding: 22px 18px; }
  .canvas-stage { min-height: 360px; margin-right: calc(50% - 50vw); margin-left: calc(50% - 50vw); }
  .preview-actions { align-items: stretch; }
  .preview-actions .button { width: 100%; }
  .check-item input { left: 16px; }
  .check-item label { padding-right: 15px; padding-left: 50px; }
  .score-panel { padding: 28px 22px; }
  .foot-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
