/* Resumade — app styles, Philanthrosoft brand tokens */
:root {
  --brand-700: #000E5E;
  --brand-500: #001489;
  --brand-400: #3A4FB0;
  --brand-200: #A9B4E8;
  --brand-050: #EEF1FB;
  --ink: #16131D;
  --ink-muted: #5B5566;
  --surface: #FFFFFF;
  --surface-alt: #F6F5F8;
  --border: #E4E1EA;
  --field-border: #9B95A6;
  --warn-bg: #FDF3E7;
  --warn-border: #F1D9BC;
  --warn-ink: #8A4B0B;
  --ok-ink: #1E6B3A;
  --ok-bg: #E8F5EC;
  --danger: #B42318;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(22, 19, 29, .06), 0 4px 16px rgba(22, 19, 29, .06);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--surface); line-height: 1.5; }
main { flex: 1; outline: none; }
a { color: var(--brand-500); }
a:hover { color: var(--brand-700); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.wrap { max-width: 1152px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.section { padding-top: 48px; padding-bottom: 48px; }
.band { background: var(--surface-alt); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-500); }

/* Top bar and footer */
.topbar { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1232px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 10px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; }
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.brand-by { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--border); }
.brand-by img { height: 26px; width: auto; display: block; }
@media (min-width: 560px) { .brand-by { gap: 10px; padding-left: 14px; } .brand-by img { height: 32px; } }
@media (max-width: 479px) {
  .topbar-in { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .brand { gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-name { font-size: 18px; }
  .brand-by { padding-left: 8px; }
  .brand-by > span { display: none; }
  .topbar-actions .btn-sm { padding: 0 10px; font-size: 14px; min-height: 40px; }
}
.topbar-actions { margin-left: auto; display: flex; gap: 8px; }
.foot { border-top: 1px solid var(--border); margin-top: 32px; }
.foot-in { max-width: 1152px; margin: 0 auto; padding: 20px 16px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink-muted); }
.powered { display: flex; align-items: center; gap: 8px; }
.powered img { height: 16px; width: auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--radius-md); border: 1.5px solid transparent; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; background: var(--brand-500); color: #fff; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { background: var(--brand-700); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-outline { background: var(--surface); color: var(--brand-500); border-color: var(--brand-500); }
.btn-outline:hover { background: var(--brand-050); color: var(--brand-700); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--ink); }
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #2B2535; }
.btn-white { background: #fff; color: var(--brand-700); }
.btn-white:hover { background: var(--brand-050); color: var(--brand-700); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-link { background: none; border: none; color: var(--brand-500); font-weight: 600; cursor: pointer; padding: 8px 4px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--brand-700); background: none; }
.btn-danger-link { color: var(--danger); }
.btn .ico { width: 18px; height: 18px; }
.btn-block { width: 100%; }

/* Home */
.hero { padding-top: 56px; padding-bottom: 40px; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 700; letter-spacing: -.03em; margin: 12px 0 16px; max-width: 760px; }
.hero p { font-size: 18px; color: var(--ink-muted); max-width: 640px; }
.choices { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); padding-bottom: 56px; }
.choice { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.choice h2 { font-size: 26px; letter-spacing: -.02em; }
.choice ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.choice .btn { align-self: flex-start; margin-top: auto; }
.choice-feature { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.choice-feature p, .choice-feature li { color: #fff; }
.ico-tile { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-050); display: flex; align-items: center; justify-content: center; }
.choice-feature .ico-tile { background: var(--brand-700); }
.ico-tile svg { width: 28px; height: 28px; }
.pill { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--brand-050); color: var(--brand-700); }
.pill-white { background: #fff; color: var(--brand-700); }
.steps4 { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps4 li { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.steps4 h3 { font-size: 18px; }
.promises { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.promise { display: flex; gap: 12px; align-items: flex-start; }
.promise svg { flex-shrink: 0; width: 24px; height: 24px; margin-top: 2px; }

/* Page heads */
.page-head { padding: 32px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.page-head h1 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -.02em; }
.page-head p { color: var(--ink-muted); max-width: 680px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 720px) { .card { padding: 24px; } }
.card h2 { font-size: 21px; letter-spacing: -.01em; }
.card h3 { font-size: 17px; }
.card-tint { background: var(--brand-050); border-color: var(--brand-050); }
.card-warn { background: var(--warn-bg); border-color: var(--warn-border); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 14px; font-weight: 600; }
.hint { font-size: 13px; color: var(--ink-muted); font-weight: 400; }
.input, .select, .textarea { width: 100%; font-size: 16px; padding: 11px 13px; border: 1px solid var(--field-border); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
.textarea { line-height: 1.5; resize: vertical; min-height: 96px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-500); outline: 2px solid var(--brand-200); outline-offset: 0; }
.input:disabled { background: var(--surface-alt); color: var(--ink-muted); }
.check { display: flex; gap: 10px; align-items: center; font-size: 15px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand-500); }
.counter { font-size: 13px; color: var(--ink-muted); text-align: right; }
.counter.over { color: var(--danger); font-weight: 600; }

/* Builder */
.stepnav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: thin; }
.stepnav a { flex-shrink: 0; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-muted); text-decoration: none; }
.stepnav a.done { background: var(--brand-050); border-color: var(--brand-050); color: var(--brand-700); }
.stepnav a[aria-current="step"] { background: var(--brand-500); border-color: var(--brand-500); color: #fff; font-weight: 600; }
.progress { height: 6px; background: var(--brand-050); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand-500); border-radius: 999px; transition: width .25s; }
.workspace { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); padding-bottom: 32px; }
@media (min-width: 1040px) { .workspace { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; } }
.form-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.preview-col { display: none; min-width: 0; }
@media (min-width: 1040px) { .preview-col { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 76px; } }
.preview-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.item { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); }
.item-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item-head h3 { font-size: 16px; }
.add-btn { min-height: 48px; border-radius: var(--radius-md); border: 1.5px dashed var(--field-border); background: transparent; color: var(--brand-700); font-weight: 600; cursor: pointer; }
.add-btn:hover { background: var(--brand-050); }
.helper { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: var(--brand-050); border-radius: var(--radius-md); padding: 12px 16px; font-size: 14px; }
.nav-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.mobile-preview-btn { display: inline-flex; }
@media (min-width: 1040px) { .mobile-preview-btn { display: none; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--brand-050); color: var(--brand-700); font-weight: 500; }
.chip button { width: 28px; height: 28px; border-radius: 999px; border: none; background: transparent; color: var(--brand-700); cursor: pointer; font-size: 18px; line-height: 1; }
.chip button:hover { background: var(--brand-200); }
.tip { font-size: 14px; color: var(--ink-muted); background: var(--surface-alt); border-radius: var(--radius-md); padding: 12px 14px; }

/* Choice chips (fields, roles, templates) */
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--field-border); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 15px; }
.opt:hover { border-color: var(--brand-500); }
.opt[aria-pressed="true"] { background: var(--brand-500); border-color: var(--brand-500); color: #fff; font-weight: 600; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.seg button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: none; background: transparent; color: var(--ink-muted); cursor: pointer; font-size: 14px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 600; }

/* Style and colour picker */
.style-picker { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 2px; }
.swatch { width: 40px; height: 40px; border-radius: 999px; border: none; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.swatch::before { content: ""; width: 26px; height: 26px; border-radius: 999px; background: var(--sw); box-shadow: 0 0 0 1px rgba(22, 19, 29, .12); }
.swatch[aria-pressed="true"]::before { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.on-brand .swatch[aria-pressed="true"]::before { box-shadow: 0 0 0 2px var(--brand-500), 0 0 0 4px #fff; }
.on-brand .swatch::before { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7); }

/* Upload */
.drop { border: 2px dashed var(--field-border); border-radius: var(--radius-lg); padding: 40px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; background: var(--surface); cursor: pointer; }
.drop.drag { border-color: var(--brand-500); background: var(--brand-050); }
.drop svg { width: 40px; height: 40px; }
.status { display: flex; gap: 12px; align-items: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--brand-050); border-top-color: var(--brand-500); animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.alert { border-radius: var(--radius-md); padding: 14px 16px; font-size: 15px; display: flex; gap: 10px; align-items: flex-start; }
.alert-error { background: #FEF3F2; color: #7A271A; border: 1px solid #FECDCA; }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-border); }
.alert-ok { background: var(--ok-bg); color: var(--ok-ink); }
.found { list-style: none; margin: 0; padding: 0; }
.found li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.found li:last-child { border-bottom: none; }
.found .warn { color: var(--warn-ink); }

/* Results */
.score { background: var(--ink); color: #F4F2F7; border-radius: var(--radius-lg); padding: 28px; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: center; }
.score h1 { font-size: clamp(30px, 5vw, 40px); letter-spacing: -.025em; }
.score p { color: #B3ADBE; }
.score .eyebrow { color: var(--brand-200); }
.bar-row { display: flex; flex-direction: column; gap: 6px; }
.bar-row > div:first-child { display: flex; justify-content: space-between; font-size: 14px; }
.bar { height: 10px; border-radius: 999px; background: #332D3D; overflow: hidden; }
.bar > div { height: 100%; border-radius: 999px; }
.three { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.three ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.change { gap: 14px; }
.change-tag { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-500); }
.diff { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.diff > div { border-radius: var(--radius-md); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.diff .before { background: var(--surface-alt); color: var(--ink-muted); }
.diff .after { background: var(--brand-050); }
.diff .lbl { font-size: 13px; font-weight: 600; }
.diff .after .lbl { color: var(--brand-700); }
.state { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.state-accepted { background: var(--ok-bg); color: var(--ok-ink); }
.state-skipped { background: var(--surface-alt); color: var(--ink-muted); }
.state-conflict { background: var(--warn-bg); color: var(--warn-ink); }
.learn-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.learn .tag { align-self: flex-start; font-size: 13px; font-weight: 600; color: var(--warn-ink); background: var(--warn-bg); padding: 4px 10px; border-radius: 999px; }
.search-terms { display: flex; flex-wrap: wrap; gap: 6px; }
.search-terms button { font-size: 13px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-alt); cursor: pointer; color: var(--ink); min-height: 32px; }
.search-terms button:hover { border-color: var(--brand-500); }
.done-panel { background: var(--brand-500); color: #fff; border-radius: var(--radius-lg); padding: 28px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.done-panel p { color: var(--brand-050); }

/* Modal and toast */
.modal-back { position: fixed; inset: 0; background: rgba(22, 19, 29, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; padding: 0; }
@media (min-width: 640px) { .modal-back { align-items: center; padding: 24px; } }
.modal { background: var(--surface); width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 640px) { .modal { border-radius: var(--radius-lg); } }
.modal-wide { max-width: 900px; }
.modal h2 { font-size: 22px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius-md); font-size: 15px; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; }

/* Privacy */
.prose { max-width: 720px; display: flex; flex-direction: column; gap: 16px; padding-bottom: 32px; }
.prose h2 { font-size: 21px; margin-top: 12px; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
