@import url("/fonts/fonts.css");
:root {
  /* Aatio brand: warm paper background, charcoal ink, deep teal, navy, a touch of red. */
  --bg: #faf9f7; --panel: #fff; --ink: #303030; --muted: #50585b; --line: #e5e7eb;
  --brand: #205b63; --brand-ink: #fff; --brand-soft: #e8eeee; --navy: #12385b; --accent: #c63523; --amber: #f59e0b;
  --serif: "Source Serif 4", Georgia, serif;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --radius: 10px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
a { color: var(--brand); }
.top { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--brand); text-decoration: none; }
.brand > span { display: flex; flex-direction: column; line-height: 1.1; color: var(--ink); }
.brand small { color: var(--muted); font-size: 11px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { padding: 6px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; font-weight: 500; }
nav a.active, nav a:hover { background: var(--brand-soft); color: var(--brand); }
main { max-width: 1200px; margin: 0 auto; padding: 24px; min-height: 70vh; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }
.banner { background: #fff7ed; border-bottom: 1px solid #fed7aa; color: #7c2d12; padding: 8px 24px; font-size: 14px; }
h1 { font-size: 24px; margin: 0 0 4px; }
h2 { font-size: 18px; margin: 24px 0 8px; }
h3 { font-size: 15px; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.link { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.card.link:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(15,118,110,.08); }
.card p { margin: 4px 0 0; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 7px 12px; border-radius: 7px; font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--brand); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.small { padding: 3px 8px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: progress; }
label { display: block; font-weight: 500; font-size: 13px; margin: 10px 0 4px; }
input, select, textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 720px) { .form2 { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #fafbfc; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: #fafcfc; }
.tablewrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: #eef2f5; color: var(--muted); white-space: nowrap; }
.tag.mandatory, .tag.bad, .tag.exception, .tag.disqualified, .tag.no_go, .tag.high { background: #fee2e2; color: var(--bad); }
.tag.rated, .tag.open, .tag.submitted { background: #e0f2fe; color: #0369a1; }
.tag.pricing, .tag.partial, .tag.conditional, .tag.medium, .tag.ai_draft { background: #fef3c7; color: var(--warn); }
.tag.comply, .tag.approved, .tag.awarded, .tag.go, .tag.low, .tag.won, .tag.reviewed { background: #dcfce7; color: var(--ok); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 16px 0; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 8px 12px; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--brand); border-color: var(--brand); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; }
.req { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.req .q { font-weight: 500; }
.req textarea { min-height: 110px; margin-top: 8px; }
.score { font-size: 22px; font-weight: 700; }
.bar { height: 8px; background: #eef2f5; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); }
.empty { text-align: center; padding: 40px; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }
.hero { background: linear-gradient(135deg, #205b63, #12385b); color: #fff; border-radius: 14px; padding: 28px; margin-bottom: 20px; }
.hero h1 { font-size: 30px; font-family: var(--serif); font-weight: 400; } .hero p { color: #dfe9ea; max-width: 760px; margin: 6px 0 0; }
.stat { font-size: 28px; font-weight: 700; }
#toast { position: fixed; bottom: 20px; right: 20px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 420px; z-index: 10; }
#toast.show { opacity: 1; }
#toast.err { background: var(--bad); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
dialog { border: 1px solid var(--line); border-radius: 12px; padding: 20px; width: min(720px, 94vw); }
dialog::backdrop { background: rgba(20,32,43,.35); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #eef2f5; border-radius: var(--radius); padding: 8px; min-height: 120px; }
.colhead { font-weight: 600; font-size: 13px; padding: 4px 6px 8px; display: flex; justify-content: space-between; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.pcard a { color: var(--ink); text-decoration: none; } .pcard a:hover { color: var(--brand); }
.top nav { flex: 1; }

.usermenu { margin-left: auto; position: relative; }
.usermenu summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid #d8dde3; border-radius: 999px; font-size: 14px; background: #fff; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary::after { content: " ▾"; color: #6b7280; }
.usermenu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid #d8dde3; border-radius: 10px; padding: 14px; min-width: 240px; box-shadow: 0 8px 24px rgba(0,0,0,.08); z-index: 20; }

.libpick { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-top: 6px; background: #fff; }
.libitem { display: flex; gap: 8px; align-items: baseline; font-weight: normal; margin: 4px 0; }
.libitem input { width: auto; }

.privacy { background: #f2f7f6; border: 1px solid #d5e6e2; border-radius: 8px; padding: 10px 12px; margin: 10px 0; color: #24433d; line-height: 1.45; }

/* Headings in the Aatio serif */
h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
.brand b { font-weight: 700; letter-spacing: -0.01em; }
.brand .dot { color: var(--brand); }

/* Signed-out welcome page */
body.landing #nav, body.landing #me { display: none; }
.welcome { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start; padding: 36px 0 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: .17em; font-size: 12px; color: var(--brand); font-weight: 600; margin: 0 0 12px; }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; margin: 0 0 16px; color: var(--ink); }
.lede { font-size: 17px; color: var(--muted); max-width: 620px; }
.btn.lg { padding: 12px 20px; font-size: 16px; border-radius: 8px; }
.w-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding: 0 0 12px 26px; color: var(--muted); font-size: 14px; }
.checks li b { color: var(--ink); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--brand-soft); box-shadow: inset 0 0 0 4px var(--brand); }
.w-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-top: 1px solid var(--line); padding-top: 28px; margin-top: 8px; }
.w-steps h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; margin: 6px 0; }
.w-steps p { color: var(--muted); font-size: 14px; margin: 0; }
.w-steps .num { font-size: 12px; color: var(--brand); letter-spacing: .12em; font-weight: 600; }
@media (max-width: 860px) { .welcome, .w-steps { grid-template-columns: 1fr; } }

.refbar { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; }
.warnbox { border-color: #f1d3a6; background: #fff8ee; margin-bottom: 14px; }
.linkbtn { background: none; border: 0; padding: 0 4px; color: var(--brand, #205b63); text-decoration: underline; cursor: pointer; font: inherit; }
.signedout { max-width: 1120px; margin: 24px auto 0; padding: 14px 18px; border-radius: 12px; background: #e8f1f2; border: 1px solid #cfe0e2; color: #12385b; }
.checks.sharp li { display: flex; flex-direction: column; gap: 2px; }
.checks.sharp li b { font-size: 17px; letter-spacing: -0.01em; }
.checks.sharp li span { font-size: 13.5px; opacity: .78; }
.signin { display: none; margin-left: auto; align-items: center; gap: 12px; }
body.landing .signin { display: flex; }
@media (max-width: 640px) { .signin .small { display: none; } }
table.matrix th.sk, table.matrix td.sk { text-align: center; font-size: 12px; }
.lvl { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font-weight: 600; font-size: 12px; }
.lvl.l0 { background: transparent; color: #b8bec2; }
.lvl.l1 { background: #eef4f5; color: #50585b; } .lvl.l2 { background: #d5e6e8; color: #205b63; }
.lvl.l3 { background: #a9cdd1; color: #12385b; } .lvl.l4 { background: #4f8f97; color: #fff; } .lvl.l5 { background: #205b63; color: #fff; }
details.dl { position: relative; } details.dl > summary { list-style: none; } details.dl > summary::-webkit-details-marker { display: none; }
.dl-pop { position: absolute; right: 0; top: calc(100% + 4px); background: var(--panel, #fff); border: 1px solid var(--line, #e5e7eb); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.08); padding: 6px; z-index: 10; min-width: 260px; }
.dl-pop a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.dl-pop a:hover { background: #f3f5f6; }
dialog.wide { width: min(880px, 94vw); max-height: 92vh; overflow: auto; }
dialog.wide h3 { margin: 18px 0 8px; font-size: 15px; }
.form3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
@media (max-width: 720px) { .form3 { grid-template-columns: 1fr; } }
table.tight td, table.tight th { padding: 4px 6px; }
table.team input, table.team select { margin: 2px 0; }
select.needs { border-color: #c63523; background: #fff6f4; }
tr.total td { border-top: 2px solid var(--line, #e5e7eb); }
