:root {
  --blue: #1f4e8c;
  --blue-dark: #163a68;
  --blue-light: #e8eff8;
  --green: #2e9e5b;
  --green-dark: #23804a;
  --green-light: #e6f5ec;
  --amber: #d97706;
  --amber-light: #fdf3e3;
  --red: #c0392b;
  --red-light: #fbe9e7;
  --ink: #1b2430;
  --muted: #5b6878;
  --line: #dbe2ea;
  --bg: #f6f8fb;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 760px; }

/* header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.brand .mark { width: 34px; height: 34px; }
.brand .tag { font-weight: 400; color: var(--muted); font-size: .85rem; margin-left: .35rem; display: none; }
@media (min-width: 640px) { .brand .tag { display: inline; } }
nav a { margin-left: 1rem; text-decoration: none; color: var(--ink); font-weight: 500; }
nav a.btn { margin-left: 1rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.15rem; border-radius: 10px; border: 1px solid transparent; font-weight: 600; cursor: pointer; text-decoration: none; font-size: 1rem; line-height: 1; transition: background .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-light); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-sm { padding: .45rem .8rem; font-size: .9rem; }
.btn-danger { background: #fff; color: var(--red); border-color: var(--red); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* banner */
.event-banner { background: var(--amber-light); border-bottom: 1px solid #f3dfbd; }
.event-banner .wrap { display: flex; gap: 1rem; align-items: center; padding: .75rem 1.25rem; flex-wrap: wrap; }
.event-banner strong { color: #92400e; }
.event-banner a { font-weight: 600; }

/* hero */
.hero { background: linear-gradient(160deg, var(--blue-dark), var(--blue) 70%); color: #fff; padding: 3.5rem 0; }
.hero h1 { color: #fff; }
.hero p { color: #d8e3f3; font-size: 1.15rem; max-width: 640px; }
.hero .actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.hero .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn-outline:hover { background: rgba(255,255,255,.12); }

/* layout */
section { padding: 2.5rem 0; }
.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .35rem; }
.card.link { text-decoration: none; color: inherit; display: block; transition: border-color .15s; }
.card.link:hover { border-color: var(--blue); }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step .num { flex: 0 0 36px; height: 36px; border-radius: 50%; background: var(--green-light); color: var(--green-dark); font-weight: 700; display: grid; place-items: center; }

/* resources */
.res-group { margin-bottom: 1.75rem; }
.res-group h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; color: var(--blue-dark); border-bottom: 2px solid var(--blue-light); padding-bottom: .4rem; margin-bottom: .75rem; }
.res { padding: .9rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; }
.res:last-child { border-bottom: 0; }
.res .name { font-weight: 600; }
.res .org { color: var(--muted); font-size: .9rem; }
.res .meta { font-size: .95rem; margin-top: .25rem; }
.res .meta span { display: inline-block; margin-right: 1rem; }
.res .notes { font-size: .9rem; color: var(--muted); margin-top: .3rem; }
.res .area-tag { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.pill-verified { background: var(--green-light); color: var(--green-dark); }
.pill-ai_drafted { background: var(--amber-light); color: #92400e; }
.pill-needs_recheck { background: var(--red-light); color: var(--red); }
.pill-event { background: var(--blue-light); color: var(--blue-dark); }

/* forms */
form { margin: 0; }
label { display: block; font-weight: 600; font-size: .9rem; margin: .75rem 0 .25rem; }
input, select, textarea { width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-light); border-color: var(--blue); }
textarea { min-height: 80px; resize: vertical; }
.row { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.form-actions { margin-top: 1rem; display: flex; gap: .5rem; flex-wrap: wrap; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.25rem 0; }
legend { font-weight: 700; padding: 0 .4rem; color: var(--blue-dark); }
.check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.check input { width: auto; }

/* portal */
.portal { display: grid; grid-template-columns: 240px 1fr; gap: 1.5rem; padding: 1.5rem 0; }
@media (max-width: 800px) { .portal { grid-template-columns: 1fr; } }
.sidebar .card { padding: .75rem; }
.sidebar a { display: block; padding: .55rem .75rem; border-radius: 8px; text-decoration: none; color: var(--ink); }
.sidebar a.active, .sidebar a:hover { background: var(--blue-light); color: var(--blue-dark); font-weight: 600; }
.sidebar .prop { font-size: .85rem; color: var(--muted); padding: .4rem .75rem; }
.list-item { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .actions { display: flex; gap: .4rem; align-items: flex-start; }
.empty { color: var(--muted); padding: 1rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--green); }

/* misc */
.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 10px; opacity: 0; transition: all .25s; z-index: 50; font-size: .95rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-err { background: var(--red); }
footer { padding: 2.5rem 0; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 2rem; }
footer a { color: var(--muted); }
.hidden { display: none !important; }
.callout { background: var(--blue-light); border-left: 4px solid var(--blue); padding: .9rem 1rem; border-radius: 8px; }
.callout-green { background: var(--green-light); border-left-color: var(--green); }
