:root {
  --bg: #f8f3f0;
  --card: #ffffff;
  --text: #0f1b2d;
  --muted: #5d6676;
  --line: #e6ddd6;
  --accent: #014baa;
  --accent-dark: #013a85;
  --accent-soft: #e7eefa;
  --cream: #f8f3f0;
  --code: #faf7f5;
  --danger: #b42318;
  --display: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --brand: #014baa;
  --header-bg: rgba(248, 243, 240, .94);
  color-scheme: light;
}
/* Dark theme: used only when the visitor picks it with the button in the header (html[data-theme="dark"]); the default is light */
:root[data-theme="dark"] {
  --bg: #0c1422; --card: #131e31; --text: #e9eef6; --muted: #9aa7ba; --line: #24324a;
  --accent: #6aa6ff; --accent-dark: #8dbbff; --accent-soft: #1a2b48; --code: #0f1929;
  --danger: #ff8a80; --header-bg: rgba(12, 20, 34, .92); color-scheme: dark;
}
:root[data-theme="dark"] .chip.on, :root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.primary:hover, :root[data-theme="dark"] .count { color: #08111f; }
:root[data-theme="dark"] .logo-mark { background: var(--brand); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

body { overflow-x: clip; }
.wrap-wide { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.top { background: var(--header-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
/* logo on the left with space around it; the menu starts at the middle and runs towards the right, never touching the corner */
.top-in { display: grid; grid-template-columns: 1fr 1fr; align-items: center; height: 68px; gap: 16px; }
.logo { font-family: var(--display); font-size: 21px; color: var(--accent); text-decoration: none; display: flex; align-items: center; gap: 10px; white-space: nowrap; justify-self: start; }
.logo-mark { background: var(--accent); color: #fff; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 13px; font-family: system-ui, sans-serif; }
nav { display: flex; align-items: center; gap: 4px; justify-self: start; }
nav a { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 14px; border-radius: 8px; white-space: nowrap; display: inline-flex; align-items: center; }
nav a:hover { background: var(--accent-soft); color: var(--accent); }
nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.count { background: var(--accent); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 7px; margin-left: 6px; }

.hero { margin: 0 calc(50% - 50vw); padding: 64px 16px 112px; text-align: center; background: var(--brand); color: var(--cream); }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 5.4vw, 58px); line-height: 1.04; letter-spacing: -.5px; text-transform: uppercase; margin: 0 auto 16px; max-width: 920px; text-wrap: balance; }
.hero p { color: rgba(248, 243, 240, .86); margin: 0 auto; max-width: 600px; font-size: 17px; }
.hero + .card { position: relative; margin-top: -76px; box-shadow: 0 22px 44px -24px rgba(1, 40, 95, .45); }
.badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.badge { border: 1px solid rgba(248, 243, 240, .38); border-radius: 999px; padding: 5px 13px; font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin: 0 0 20px; }
.card h2 { margin: 0 0 8px; font-size: 20px; }
.card h3 { margin: 22px 0 8px; font-size: 16px; }

.field { margin-bottom: 20px; }
.label { font-weight: 600; margin-bottom: 9px; display: flex; align-items: center; gap: 8px; }
.step { background: var(--accent-soft); color: var(--accent); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }
.hint { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.error { color: var(--danger); font-size: 14px; margin: 10px 0 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 8px 14px; border-radius: 999px; font: inherit; font-size: 15px; cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
select, textarea, input[type=text] {
  width: 100%; font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px;
}
textarea { resize: vertical; }
input[type=text] { margin-top: 10px; }
select:focus, textarea:focus, input:focus, .chip:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: 9px 16px; border-radius: 9px; font: inherit; font-size: 15px; cursor: pointer;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; padding: 12px 22px; width: 100%; font-size: 16px; }
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.small { padding: 5px 11px; font-size: 13px; }

.result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.result-head h2 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.block { border: 1px solid var(--line); border-radius: 10px; margin-top: 14px; overflow: hidden; }
.block-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: var(--code); font-weight: 600; font-size: 14px; }
pre {
  margin: 0; padding: 14px; background: var(--card); white-space: pre-wrap; overflow-wrap: anywhere;
  font: 14px/1.55 ui-monospace, Consolas, "Courier New", monospace;
}
#skillText { border: 1px solid var(--line); border-radius: 10px; background: var(--code); margin: 10px 0; max-height: 320px; overflow: auto; }
ol, ul { padding-left: 22px; margin: 8px 0; }
li { margin-bottom: 6px; }

.saved { list-style: none; padding: 0; }
.saved li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.saved .meta { color: var(--muted); font-size: 13px; }
.saved .title { overflow-wrap: anywhere; }

.foot { background: var(--brand); color: rgba(248, 243, 240, .75); font-size: 14px; text-align: center; padding: 32px 0; margin-top: 40px; }

@media (max-width: 640px) {
  .hero h1 { font-size: 24px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 16px; }
}

/* ---- content pages ---- */
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 10px; }
.foot a { color: var(--cream); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.prose a, .crumb a { color: var(--accent); }
.foot p { margin: 0; }
a.btn { text-decoration: none; display: inline-block; }

.links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
.link-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); }
.link-card:hover { border-color: var(--accent); }
.link-card span { color: var(--muted); font-size: 14px; }
.card h2.gap { margin-top: 26px; }

.prose h2 { margin: 26px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 18px 0 4px; }
.prose p { margin: 8px 0; }
.prose code { background: var(--code); padding: 1px 6px; border-radius: 5px; font-size: 14px; }
.article h1 { font-size: 28px; line-height: 1.25; margin: 4px 0 6px; text-wrap: balance; }
.crumb { margin: 0; font-size: 14px; }
pre.example { border: 1px solid var(--line); border-radius: 10px; background: var(--code); margin: 10px 0; max-height: 380px; overflow: auto; }
.skill { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.skill-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.skill-head h3 { margin: 0; }
summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-top: 8px; }

@media (max-width: 640px) {
  .links { grid-template-columns: 1fr; }
}

/* ---- header on medium and small screens ---- */
@media (max-width: 1100px) {
  .top-in { display: flex; justify-content: space-between; }
}
@media (max-width: 760px) {
  .wrap-wide { padding: 0 16px; }
  .top-in { height: auto; padding-top: 10px; padding-bottom: 6px; flex-direction: column; align-items: flex-start; gap: 6px; }
  nav { width: 100%; overflow-x: auto; scrollbar-width: none; margin-left: -10px; }
  nav a { padding: 6px 10px; font-size: 14px; }
  .hero { padding: 44px 16px 96px; }
}
/* ---- ready ideas and prompt lists ---- */
.idea-btn { margin-left: auto; font-weight: 500; }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.suggest-label { color: var(--muted); font-size: 13px; margin-right: 2px; }
.suggest-chip { font: inherit; font-size: 13px; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.suggest-chip:hover { text-decoration: underline; }
.pcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 14px 0; }
.pcard h3 { margin: 0 0 4px; }
.pcard p { margin: 0 0 10px; }
.pcard details { margin-top: 6px; }
/* ---- added: self-hosted heading font, footer columns, tables (no existing rule changed) ---- */
@font-face { font-family: "Archivo Black"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/archivo-black-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px; text-align: left; margin-bottom: 28px; }
.foot-h { font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--cream); margin: 0 0 10px; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 0 0 7px; }
.foot-note { border-top: 1px solid rgba(248, 243, 240, .22); padding-top: 18px; margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--code); }
/* ---- added: cookie choice banner ---- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 720px; margin: 0 auto; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -18px rgba(1, 40, 95, .5); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.consent p { margin: 0; flex: 1 1 280px; font-size: 14px; }
.consent a { color: var(--accent); }
.consent .btn.accept { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .consent .btn.accept { color: #08111f; }
/* ---- added: prompt checker ---- */
.check-score { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--accent); margin: 18px 0 4px; }
.check-note { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.check-list { list-style: none; padding: 0; margin: 10px 0 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.check-list b { display: block; }
.check-list .btn { margin-top: 6px; text-align: left; }
.check-mark { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.check-list .miss .check-mark { background: #fdecea; color: var(--danger); }
.warn { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: 14.5px; }
:root[data-theme="dark"] .check-list .miss .check-mark { background: #3a1d1d; }

/* ---- added: light / dark theme button (right corner of the header) ---- */
.top-in { position: relative; }
.theme-toggle { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (max-width: 1100px) { .theme-toggle { position: static; transform: none; flex: 0 0 auto; } }
@media (max-width: 760px) { .theme-toggle { position: absolute; right: 0; top: 7px; width: 36px; height: 36px; } }
/* Tool picker (dropdown with search, grouped) */
.tp { position: relative; max-width: 460px; }
.tp-btn { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: var(--card); color: var(--text); border: 2px solid var(--accent); border-radius: 12px; padding: 11px 14px; font: inherit; font-size: 15px; cursor: pointer; }
.tp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tp-cur { font-weight: 700; }
.tp-btn .tp-meta { flex: 1; }
.tp-arrow { color: var(--accent); font-size: 14px; }
.tp-meta { color: var(--muted); font-size: 12.5px; }
.tp-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(15, 27, 45, .16); overflow: hidden; }
.tp-menu[hidden] { display: none; }
input[type=text].tp-search { margin: 10px; width: calc(100% - 20px); font-size: 14px; }
.tp-list { max-height: 320px; overflow-y: auto; padding-bottom: 6px; }
.tp-group { font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); padding: 8px 14px 4px; }
.tp-group[hidden], .tp-item[hidden] { display: none; }
.tp-item { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: none; border: 0; padding: 9px 14px; font: inherit; font-size: 15px; color: var(--text); cursor: pointer; text-align: left; }
.tp-item:hover, .tp-item:focus-visible { background: var(--accent-soft); outline: none; }
.tp-item.on { background: var(--accent-soft); font-weight: 700; }
.tp-name { display: flex; align-items: center; gap: 6px; }
.tp-new { font-size: 10px; font-weight: 800; background: #16a34a; color: #fff; border-radius: 6px; padding: 2px 6px; }
.tp-empty { color: var(--muted); font-size: 14px; margin: 4px 14px 12px; }
@media (max-width: 520px) { .tp { max-width: none; } .tp-btn .tp-meta { display: none; } .tp-cur { flex: 1; } }
