/* Kerr Office Group brand (KERR Brand Guidelines 2026)
   Primary palette: Kerr Orange #F17E42, Soft Grey #D6D1C7, Charcoal #262626
   Secondary palette: Bronze #5D5244, Off-white #FAFAFA
   Type: Geist (primary sans), IvyOra Text (secondary serif) */

@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IvyOra Text"; src: url("fonts/IvyOraText-Regular.otf") format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IvyOra Text"; src: url("fonts/IvyOraText-Light.otf") format("opentype"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "IvyOra Text"; src: url("fonts/IvyOraText-Italic.otf") format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IvyOra Text"; src: url("fonts/IvyOraText-LightItalic.otf") format("opentype"); font-weight: 300; font-style: italic; font-display: swap; }

:root {
  --kerr-orange: #F17E42;
  --kerr-soft-grey: #D6D1C7;
  --kerr-charcoal: #262626;
  --kerr-bronze: #5D5244;
  --kerr-off-white: #FAFAFA;

  --accent: var(--kerr-orange);      /* overridable via BRAND_COLOR */
  --ink: var(--kerr-charcoal);
  --muted: #6B6358;                  /* warm grey from bronze, AA on white */
  --bg: var(--kerr-off-white);
  --surface: #ffffff;
  --line: #E6E2DB;
  --soft: #F3F1ED;
  --good: #2F6B4F;  --good-bg: #E6EFE9;
  --warn: #8A4A1C;  --warn-bg: #FCEBDD;
  --bad: #A8321E;   --bad-bg: #FAE6E1;
  --radius: 14px;

  --sans: "Geist", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "IvyOra Text", "Iowan Old Style", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--sans); }
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--kerr-bronze); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 400; }
h1 { font-size: 2.1rem; font-weight: 300; letter-spacing: -0.02em; }          /* Display sans: Geist Light */
h2 { font-family: var(--serif); font-size: 1.45rem; margin-top: 1.6em; }      /* H2: IvyOra Text Regular */
h3 { font-size: 1.05rem; font-weight: 500; }
em.serif, .serif-accent { font-family: var(--serif); font-style: italic; font-weight: 300; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--muted); }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
.overline { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

/* layout */
.topbar { background: var(--kerr-charcoal); color: #fff; }
.topbar .inner { display: flex; align-items: center; gap: 20px; max-width: 1180px; margin: 0 auto; padding: 14px 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.brand svg { height: 20px; width: auto; display: block; }
.brand .app { font-weight: 300; font-size: 1.05rem; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.3); }
.nav { display: flex; gap: 2px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav a, .nav button.linklike { color: #fff; text-decoration: none; padding: 6px 10px; font-size: .92rem; opacity: .8; border-bottom: 2px solid transparent; border-radius: 0; }
.nav a:hover, .nav button.linklike:hover { opacity: 1; color: #fff; }
.nav a.active { opacity: 1; border-bottom-color: var(--accent); }
.nav .who { color: var(--kerr-soft-grey); font-size: .82rem; padding: 0 8px 0 14px; }
.nav form { margin: 0; }
main { max-width: 1180px; margin: 0 auto; padding: 32px 16px 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 0; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px 16px 40px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } h1 { font-size: 1.7rem; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* flash */
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 14px; border-left: 4px solid; }
.flash.success { background: var(--good-bg); color: var(--good); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.flash.info { background: var(--soft); color: var(--ink); border-left-color: var(--accent); }
.note { background: var(--warn-bg); color: var(--warn); padding: 11px 16px; border-radius: 10px; margin-bottom: 14px; }

/* forms */
label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #CFC9BF; border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field { margin-bottom: 14px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.inline-form { display: inline; margin: 0; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }

/* buttons: charcoal by default; orange (with charcoal text, for contrast) for the main call to action */
.btn { display: inline-block; border: 1px solid var(--kerr-charcoal); background: var(--kerr-charcoal); color: #fff; padding: 9px 18px; border-radius: 999px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; line-height: 1.3; }
.btn:hover { background: #000; color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--kerr-charcoal); }
.btn.accent:hover { filter: brightness(1.05); color: var(--kerr-charcoal); }
.btn.secondary { background: transparent; color: var(--ink); border-color: #BDB6AA; }
.btn.secondary:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn.danger { background: transparent; color: var(--bad); border-color: #DDA79C; }
.btn.danger:hover { border-color: var(--bad); color: var(--bad); background: transparent; }
.btn.small { padding: 4px 12px; font-size: .84rem; }
.btn.big { padding: 13px 28px; font-size: 1.02rem; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.linklike { background: none; border: 0; font: inherit; cursor: pointer; color: var(--ink); padding: 0; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; background: var(--soft); }
td.num, th.num { text-align: center; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

.badge { display: inline-block; font-size: .72rem; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge.open, .badge.in_progress { background: var(--kerr-soft-grey); color: var(--ink); }
.badge.closed, .badge.pending { background: var(--warn-bg); color: var(--warn); }
.badge.released, .badge.submitted, .badge.done { background: var(--good-bg); color: var(--good); }
.badge.declined { background: var(--bad-bg); color: var(--bad); }

.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* task list */
.task { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .who { font-weight: 500; }
.empty { color: var(--muted); padding: 8px 0; }

/* landing: brand gradient, as on the guidelines cover */
.hero { position: relative; overflow: hidden; border-radius: 20px; color: #fff; padding: 72px 48px 56px; min-height: 440px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(90% 110% at 100% 100%, #F17E42 0%, rgba(241,126,66,.75) 22%, rgba(160,82,40,.35) 48%, rgba(0,0,0,0) 72%),
    radial-gradient(55% 70% at 0% 100%, #D6D1C7 0%, rgba(214,209,199,.55) 30%, rgba(93,82,68,0) 70%),
    linear-gradient(165deg, #000 0%, #050403 38%, #2a1a10 70%, #5D5244 100%); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 300; letter-spacing: -0.02em; max-width: 720px; margin-bottom: .4em; }
.hero h1 em { font-family: var(--serif); font-weight: 300; }
.hero p { color: #E8E4DD; max-width: 520px; font-size: 1.05rem; margin-bottom: 28px; }
.hero .foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 40px; }
.hero .foot small { color: #fff; opacity: .8; }
.hero .foot svg { height: 26px; width: auto; color: #fff; }
@media (max-width: 760px) { .hero { padding: 40px 24px 28px; min-height: 0; } }

/* survey */
.survey-head { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.scale-legend { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; font-size: .78rem; color: var(--muted); }
.scale-legend div { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.scale-legend b { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .scale-legend { grid-template-columns: repeat(3, 1fr); } }
.factor-title { margin-top: 30px; }
.cluster-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 16px 0 8px; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.q.missing { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad-bg); }
.q .title { font-weight: 500; }
.q .num { color: var(--accent); font-weight: 600; margin-right: 6px; }
.q .desc { color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) { .q { grid-template-columns: 1fr; } }
.choices { display: flex; gap: 5px; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label { margin: 0; min-width: 42px; text-align: center; padding: 8px 6px; border: 1px solid #CFC9BF; border-radius: 999px; cursor: pointer; font-weight: 500; background: #fff; user-select: none; }
.choices label.na { font-size: .75rem; min-width: 60px; color: var(--muted); }
.choices label:hover { border-color: var(--accent); }
.choices input:checked + label { background: var(--kerr-charcoal); color: #fff; border-color: var(--kerr-charcoal); }
.choices input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.choices input:disabled + label { cursor: default; }
.survey-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); }

/* competency picker */
.picker .cluster { margin-bottom: 10px; }
.picker label.comp { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.picker label.comp input { margin-top: 4px; accent-color: var(--kerr-charcoal); }
.picker-cols { columns: 3 280px; column-gap: 28px; }
.picker-cols .factor { break-inside: avoid; margin-bottom: 14px; }
.picker-cols .cluster { break-inside: avoid; }
.picker-cols h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; }

/* report */
.report-head { border-top: 4px solid var(--accent); }
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.kpi { background: var(--soft); border-radius: 10px; padding: 12px 14px; }
.kpi .v { font-size: 1.6rem; font-weight: 300; }
.kpi .l { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.bar { position: relative; height: 12px; background: var(--soft); border-radius: 999px; min-width: 120px; }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 999px; }
.bar .self { position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--kerr-charcoal); border-radius: 2px; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; vertical-align: middle; margin-right: 4px; }
.legend-dot.others { background: var(--accent); }
.legend-dot.self { background: var(--kerr-charcoal); border-radius: 2px; width: 4px; }
.score { font-variant-numeric: tabular-nums; }
.gap-pos { color: var(--good); font-weight: 600; }
.gap-neg { color: var(--bad); font-weight: 600; }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.list-clean li:last-child { border-bottom: 0; }
.quote { background: var(--soft); border-left: 3px solid var(--kerr-soft-grey); border-radius: 0 10px 10px 0; padding: 10px 14px; margin-bottom: 8px; white-space: pre-wrap; }
/* score heat: orange tints for low, soft grey / bronze tints for high */
.heat-1 { background: #F9C9AE; } .heat-2 { background: #FCE3D4; } .heat-3 { background: #F3F1ED; } .heat-4 { background: #E3DED5; } .heat-5 { background: #CFC7BA; }

@media print {
  .topbar, .no-print, footer, .flash { display: none !important; }
  body { background: #fff; font-size: 12px; }
  main { padding: 0; max-width: none; }
  .card { border: 0; padding: 0; break-inside: avoid; }
  h2 { break-after: avoid; }
}
