:root {
  --blue:#1a81c2; --green:#87b13f; --brown:#704214;
  --brand-stripe:linear-gradient(90deg, #1a81c2 0%, #1a81c2 32%, #87b13f 44%, #87b13f 69%, #704214 81%, #704214 100%); /* exact brand colours in both modes */
  --ink:#16222d; --muted:#5d6b77; --bg:#f7fafc; --card:#fff; --line:#e1e9f0;
  --glow1:rgba(26,129,194,.14); --glow2:rgba(135,177,63,.14);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --blue:#4aa3de; --green:#a3cd5a; --brown:#d9a066;
    --ink:#eef3f7; --muted:#9fb0bd; --bg:#0e151b; --card:#16202a; --line:#26343f;
    --glow1:rgba(74,163,222,.16); --glow2:rgba(163,205,90,.10);
  }
}
:root[data-theme="dark"] {
  --blue:#4aa3de; --green:#a3cd5a; --brown:#d9a066;
  --ink:#eef3f7; --muted:#9fb0bd; --bg:#0e151b; --card:#16202a; --line:#26343f;
  --glow1:rgba(74,163,222,.16); --glow2:rgba(163,205,90,.10);
}
* { box-sizing:border-box; }
body {
  margin:0; color:var(--ink); line-height:1.6;
  font:16px/1.6 ui-sans-serif, "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(60rem 28rem at 85% -10%, var(--glow1), transparent 70%),
    radial-gradient(40rem 22rem at 0% 0%, var(--glow2), transparent 70%),
    var(--bg);
  background-repeat:no-repeat;
}
.wrap { max-width:880px; margin:0 auto; padding:0 24px; }
a { color:var(--blue); }

/* hero */
header { padding:72px 0 40px; }
header .wrap { display:flex; align-items:center; gap:40px; }
header img { height:150px; flex:none; filter:drop-shadow(0 10px 22px rgba(112,66,20,.25)); }
h1 { margin:0 0 10px; font-size:clamp(2.2rem, 6vw, 3.4rem); line-height:1.05; letter-spacing:-.03em; }
h1::after { content:""; display:block; width:56px; height:5px; margin-top:16px; border-radius:3px;
            background:var(--brand-stripe); }
header p { margin:0; font-size:1.15rem; color:var(--muted); max-width:30em; }

/* cards */
main { padding-top:8px; }
ul { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2, 1fr); gap:16px; }
li a {
  position:relative; display:flex; flex-direction:column; gap:4px; height:100%;
  padding:22px 52px 22px 24px; border-radius:16px; text-decoration:none; color:var(--ink);
  background:var(--card); border:1px solid var(--line);
  box-shadow:0 1px 2px rgba(22,34,45,.04);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
li a::after {
  content:"\2192"; position:absolute; right:22px; top:50%; transform:translateY(-50%);
  color:var(--muted); opacity:.4; font-size:1.4rem; transition:color .15s, transform .15s;
}
li a:hover { transform:translateY(-3px); border-color:var(--blue); box-shadow:0 12px 28px rgba(26,129,194,.16); }
li a:hover::after { color:var(--blue); opacity:1; transform:translate(4px, -50%); }
li strong { font-size:1.2rem; letter-spacing:-.01em; }
li span { color:var(--muted); font-size:.95rem; }

/* brand colours */
.colors { margin-top:56px; display:flex; flex-wrap:wrap; gap:12px; }
.colors h2 { flex-basis:100%; margin:0 0 2px; font-size:.78rem; font-weight:700; letter-spacing:.12em;
             text-transform:uppercase; color:var(--brown); }
.colors span {
  display:inline-flex; align-items:center; gap:10px; padding:8px 16px 8px 8px;
  background:var(--card); border:1px solid var(--line); border-radius:999px; font-size:.92rem; color:var(--muted);
}
.colors i { width:26px; height:26px; border-radius:50%; box-shadow:inset 0 0 0 1px rgba(0,0,0,.08); }
.colors code { color:var(--ink); font-size:.85rem; }

/* footer */
footer.wrap { display:flex; justify-content:center; gap:28px; margin-top:64px; padding-top:28px; padding-bottom:48px;
         border-top:1px solid var(--line); }
footer a { display:inline-flex; color:var(--muted); transition:color .15s, transform .15s; }
footer a:hover { color:var(--blue); transform:translateY(-2px); }
footer svg { display:block; width:26px; height:26px; }

@media (max-width:640px) {
  header { padding:40px 0 24px; }
  header .wrap { flex-direction:column; align-items:flex-start; gap:20px; }
  header img { height:110px; }
  ul { grid-template-columns:1fr; }
}

/* theme toggle */
#theme { position:fixed; top:16px; right:16px; z-index:10; width:42px; height:42px; border-radius:50%; cursor:pointer;
         display:grid; place-items:center; color:var(--muted); background:var(--card); border:1px solid var(--line);
         box-shadow:0 2px 8px rgba(0,0,0,.08); transition:color .15s, border-color .15s; }
#theme:hover { color:var(--blue); border-color:var(--blue); }
#theme svg { width:20px; height:20px; fill:currentColor; }
#theme .moon { display:none; }
:root[data-theme="dark"] #theme .sun { display:none; }
:root[data-theme="dark"] #theme .moon { display:block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) #theme .sun { display:none; }
  :root:not([data-theme="light"]) #theme .moon { display:block; }
}

/* featured card */
li.featured { grid-column:1 / -1; }
li.featured a { background:linear-gradient(135deg, var(--blue), #146aa3); border-color:transparent; color:#fff;
                padding-top:28px; padding-bottom:28px; box-shadow:0 10px 30px rgba(26,129,194,.28); }
li.featured strong { font-size:1.5rem; }
li.featured span { color:rgba(255,255,255,.88); font-size:1.02rem; }
li.featured a::after { content:"\2197"; color:#fff; opacity:.9; font-size:1.8rem; }
li.featured a:hover { border-color:transparent; box-shadow:0 16px 38px rgba(26,129,194,.4); }
li.featured a:hover::after { color:#fff; transform:translate(3px,-55%); }
