/* AdkinsTech Scorecard — Dan Sullivan / Dean Jackson style */
:root {
  --bg: #f4f1ea;
  --bg2: #ebe6db;
  --ink: #122033;
  --muted: #4a5868;
  --card: #fffcf7;
  --line: #d5cec0;
  --accent: #1a6fd4;
  --accent-ink: #f4f9ff;
  --steel: #163a5c;
  --steel-soft: #2f5f8a;
  --stage1: #b91c1c;
  --stage1-bg: #fef2f2;
  --stage2: #b45309;
  --stage2-bg: #fffbeb;
  --stage3: #15803d;
  --stage3-bg: #f0fdf4;
  --stage4: #1a6fd4;
  --stage4-bg: #eff6ff;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(18, 32, 51, 0.09);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(900px 480px at 90% -10%, rgba(26, 111, 212, 0.14), transparent 55%),
    radial-gradient(700px 420px at 0% 20%, rgba(28, 58, 82, 0.08), transparent 50%),
    var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1200px, calc(100% - 2rem)); margin-inline: auto; }

.top {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 86%, white);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem 0;
}
.logo {
  font-weight: 780; letter-spacing: -.03em; color: var(--ink); font-size: 1.2rem;
}
.logo span { color: var(--accent); }
nav { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; }
nav a { color: var(--muted); font-size: .92rem; font-weight: 600; }
nav a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .78rem 1.2rem; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--accent-ink); font-weight: 750;
  cursor: pointer; font-family: inherit; font-size: .95rem;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.btn-sm { padding: .45rem .9rem; font-size: .88rem; }
.btn-lg { padding: .95rem 1.35rem; font-size: 1rem; }

.sc-hero { padding: 2.5rem 0 1.5rem; }
.eyebrow {
  margin: 0 0 .6rem;
  text-transform: uppercase; letter-spacing: .14em; font-size: .72rem;
  font-weight: 700; color: var(--steel-soft);
}
.sc-hero h1 {
  margin: 0 0 .85rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.12; letter-spacing: -.03em;
}
.sc-intro {
  margin: 0 0 1rem; color: var(--muted); font-size: 1.05rem; max-width: 48rem;
}
.sc-howto {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; margin: 1.25rem 0 0; box-shadow: var(--shadow);
  max-width: 52rem;
}
.sc-howto h2 { margin: 0 0 .5rem; font-size: 1.05rem; color: var(--steel); }
.sc-howto ol { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.sc-howto li { margin: .35rem 0; }
.sc-legend {
  display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; padding: 0; list-style: none;
}
.sc-legend li {
  padding: .35rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 650;
}
.sc-legend .l1 { background: var(--stage1-bg); color: var(--stage1); border: 1px solid color-mix(in srgb, var(--stage1) 30%, transparent); }
.sc-legend .l2 { background: var(--stage2-bg); color: var(--stage2); border: 1px solid color-mix(in srgb, var(--stage2) 30%, transparent); }
.sc-legend .l3 { background: var(--stage3-bg); color: var(--stage3); border: 1px solid color-mix(in srgb, var(--stage3) 30%, transparent); }
.sc-legend .l4 { background: var(--stage4-bg); color: var(--stage4); border: 1px solid color-mix(in srgb, var(--stage4) 30%, transparent); }

.sc-toolbar {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  margin: 1.5rem 0 .75rem; justify-content: space-between;
}
.sc-toolbar .hint { color: var(--muted); font-size: .88rem; margin: 0; }

/* Desktop table */
.sc-table-wrap {
  overflow-x: auto;
  margin: 0 0 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
}
.sc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
  font-size: .88rem;
}
.sc-table th, .sc-table td {
  border: 1px solid var(--line);
  padding: .75rem .7rem;
  vertical-align: top;
  text-align: left;
}
.sc-table thead th {
  background: var(--steel);
  color: #e8f1f7;
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  position: sticky; top: 0;
}
.sc-table thead th.stage1 { background: color-mix(in srgb, var(--stage1) 85%, var(--steel)); }
.sc-table thead th.stage2 { background: color-mix(in srgb, var(--stage2) 80%, var(--steel)); }
.sc-table thead th.stage3 { background: color-mix(in srgb, var(--stage3) 75%, var(--steel)); }
.sc-table thead th.stage4 { background: color-mix(in srgb, var(--stage4) 90%, var(--steel)); }
.sc-table .cat {
  font-weight: 700; color: var(--steel); width: 11rem; background: var(--bg2);
  font-size: .92rem;
}
.sc-table td.s1 { background: var(--stage1-bg); color: var(--ink); }
.sc-table td.s2 { background: var(--stage2-bg); color: var(--ink); }
.sc-table td.s3 { background: var(--stage3-bg); color: var(--ink); }
.sc-table td.s4 { background: var(--stage4-bg); color: var(--ink); }
.sc-table .score-col {
  width: 5.5rem; text-align: center; background: #fff; vertical-align: middle;
}
.sc-table .score-col label {
  display: block; font-size: .65rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700; margin-bottom: .25rem;
}
.sc-table input[type="number"] {
  width: 3.2rem; padding: .4rem .3rem; text-align: center;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 1rem; font-weight: 700; color: var(--ink);
  background: #fff; font-family: inherit;
}
.sc-table input[type="number"]:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.sc-table tfoot td {
  background: var(--steel); color: #fff; font-weight: 750; font-size: 1rem;
  vertical-align: middle;
}
.sc-table tfoot .total-val {
  font-size: 1.35rem; color: #fff;
}
.sc-table tfoot input[type="number"] {
  background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3);
  pointer-events: none;
}

/* Mobile stacked cards — hidden on desktop */
.sc-cards { display: none; }

.sc-totals {
  display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 2rem;
  align-items: stretch;
}
.sc-total-card {
  flex: 1; min-width: 160px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow);
}
.sc-total-card .label {
  margin: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); font-weight: 700;
}
.sc-total-card .val {
  margin: .25rem 0 0; font-size: 2rem; font-weight: 780; color: var(--steel);
  letter-spacing: -.03em;
}
.sc-total-card .range {
  margin: .15rem 0 0; font-size: .8rem; color: var(--muted);
}

.sc-cta {
  background: linear-gradient(120deg, var(--accent), #0f4f9c 45%, var(--steel));
  color: #f4fffb; border-radius: calc(var(--radius) + 4px);
  padding: 1.75rem 1.5rem; margin: 0 0 2.5rem;
  display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center;
  justify-content: space-between; box-shadow: var(--shadow);
}
.sc-cta h2 { margin: 0 0 .4rem; color: #fff; font-size: 1.35rem; }
.sc-cta p { margin: 0; max-width: 36rem; color: rgba(244,255,251,.9); font-size: .95rem; }
.sc-cta .btn { background: #fff; color: var(--steel); }

.foot {
  border-top: 1px solid var(--line); padding: 1.4rem 0 2.2rem;
}
.foot-row {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  justify-content: space-between; color: var(--muted); font-size: .88rem;
}

@media (max-width: 900px) {
  .sc-table-wrap { display: none; }
  .sc-cards { display: block; margin-bottom: 1.5rem; }
  .sc-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.1rem 1.15rem; margin-bottom: 1rem; box-shadow: var(--shadow);
  }
  .sc-card h3 {
    margin: 0 0 .85rem; font-size: 1.05rem; color: var(--steel);
    padding-bottom: .5rem; border-bottom: 2px solid var(--accent);
  }
  .sc-stage {
    border-radius: 12px; padding: .7rem .8rem; margin-bottom: .55rem;
    border-left: 4px solid;
  }
  .sc-stage .range {
    display: block; font-size: .7rem; font-weight: 750; text-transform: uppercase;
    letter-spacing: .06em; margin-bottom: .25rem;
  }
  .sc-stage p { margin: 0; font-size: .88rem; color: var(--ink); }
  .sc-stage.s1 { background: var(--stage1-bg); border-color: var(--stage1); }
  .sc-stage.s1 .range { color: var(--stage1); }
  .sc-stage.s2 { background: var(--stage2-bg); border-color: var(--stage2); }
  .sc-stage.s2 .range { color: var(--stage2); }
  .sc-stage.s3 { background: var(--stage3-bg); border-color: var(--stage3); }
  .sc-stage.s3 .range { color: var(--stage3); }
  .sc-stage.s4 { background: var(--stage4-bg); border-color: var(--stage4); }
  .sc-stage.s4 .range { color: var(--stage4); }
  .sc-card-scores {
    display: flex; gap: 1rem; margin-top: .85rem; padding-top: .75rem;
    border-top: 1px solid var(--line);
  }
  .sc-card-scores label {
    display: flex; flex-direction: column; gap: .3rem;
    font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); font-weight: 700;
  }
  .sc-card-scores input[type="number"] {
    width: 4rem; padding: .5rem; text-align: center;
    border: 1px solid var(--line); border-radius: 8px;
    font-size: 1.1rem; font-weight: 700; font-family: inherit;
  }
}

@media print {
  .top, .sc-toolbar, .sc-cta, .foot, nav { display: none !important; }
  body { background: #fff; }
  .sc-table-wrap { display: block !important; box-shadow: none; overflow: visible; }
  .sc-cards { display: none !important; }
  .sc-table { min-width: 0; font-size: .7rem; }
  .sc-hero { padding: 0 0 1rem; }
}
