/* ── Base / page shell ──────────────────────────────────────────────────── */
body {
  font-family: "Times New Roman", Times, serif;
  max-width: 880px;
  margin: 24px auto;
  padding: 0 16px;
  background-color: #000000;
  color: #c0c0c0; /* Classic silver text for dark mode readability */
}

nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  padding: 8px 0 16px;
  border-bottom: 2px groove #888;
  margin-bottom: 12px;
  font-size: 16px; /* Slightly larger base font for Web 1.0 */
}

nav .spacer {
  flex: 1;
}

nav a,
nav button.link {
  color: #00ffff; /* Classic cyan links */
  text-decoration: underline;
  background: none;
  border: 0;
  font-size: 16px;
  font-family: "Times New Roman", Times, serif;
  cursor: pointer;
  padding: 0;
}

nav a:hover,
nav button.link:hover {
  color: #ff00ff; /* Magenta on hover */
}

nav .who {
  color: #808080;
}

nav .badge {
  background: #000080; /* Navy */
  color: #ffffff;
  padding: 2px 6px;
  border: 1px solid #ffffff;
  font-size: 12px;
  font-weight: bold;
}

nav .badge.admin {
  background: #800000; /* Maroon */
  color: #ffffff;
}

nav .badge.breakglass {
  background: #808000; /* Olive */
  color: #ffffff;
}

h1 {
  font-size: 28px;
  margin-bottom: 8px;
  color: #ffffff;
  font-weight: bold;
}

h2 {
  font-size: 20px;
  margin-top: 28px;
  border-bottom: 1px dashed #555;
  padding-bottom: 4px;
  color: #ffffff;
}

p.lede {
  color: #a0a0a0;
  margin-top: 0;
}

form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: end;
  margin: 12px 0 24px;
}

form.inline {
  display: inline;
  margin: 0;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #c0c0c0;
  gap: 2px;
}

input[type=text],
input[type=password],
input[type=email],
input[type=number],
select,
textarea {
  padding: 4px 6px;
  background-color: #000000;
  color: #00ff00; /* Terminal green typing */
  border: 2px inset #888;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  min-width: 200px;
}

input:focus, textarea:focus {
  outline: 1px dotted #00ffff;
}

button {
  padding: 4px 12px;
  border: 2px outset #aaa;
  background: #333333;
  color: #ffffff;
  font-family: "Arial", sans-serif;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}

button:active {
  border-style: inset;
}

button.danger {
  background: #800000;
}

button.subtle {
  background: #555555;
}

button.tiny {
  padding: 2px 8px;
  font-size: 12px;
}

/* Anchor styled as a tiny action button — the shared look for row "edit" links
   across every admin/dashboard table. Matches the real <button> actions
   (publish/delete) sitting next to it: same retro outset look, not a flat pill.
   Replaces the per-row inline styles so they're all identical. */
a.tiny-btn {
  display: inline-block;
  padding: 2px 8px;
  border: 2px outset #aaa;
  background: #1087f7;
  color: #ffffff;
  font-family: "Arial", sans-serif;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}
a.tiny-btn:active {
  border-style: inset;
}

/* Anchor styled as a full-size button (e.g. the /admin action bar links), so
   nav/CTA links match the retro <button> look. `.subtle` is the secondary tone
   for section links, mirroring button.subtle. */
a.btn {
  display: inline-block;
  padding: 4px 12px;
  border: 2px outset #aaa;
  background: #333333;
  color: #ffffff;
  font-family: "Arial", sans-serif;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}
a.btn.subtle {
  background: #555555;
}
a.btn.green {
  background: #1f7a1f;
}
a.btn:active {
  border-style: inset;
}

/* Tabs (e.g. /me admin: my vs. system counters). Panels toggled by app.js. */
.tabs {
  display: flex;
  gap: 4px;
  margin: 4px 0 0;
  border-bottom: 2px solid #888;
}
.tab-btn {
  padding: 6px 14px;
  border: 2px outset #aaa;
  border-bottom: 0;
  background: #222222;
  color: #b0b0b0;
}
.tab-btn.active {
  background: #333333;
  color: #ffffff;
  position: relative;
  top: 2px; /* sit over the bar's border so the active tab reads as connected */
}
.tab-panel {
  display: none;
  margin-top: 16px;
}
.tab-panel.active {
  display: block;
}
:root[data-theme="light"] .tabs { border-bottom-color: #b0ada6; }
:root[data-theme="light"] .tab-btn { background: #d8d5cd; color: #555555; }
:root[data-theme="light"] .tab-btn.active { background: #ffffff; color: #000000; }

/* Collapsible disclosure (e.g. the /guide style list), styled like a link. */
.styles-details > summary {
  cursor: pointer;
  font-weight: bold;
  color: #00ffff;
  padding: 6px 0;
  user-select: none;
}
.styles-details > summary:hover { color: #ff00ff; }
:root[data-theme="light"] .styles-details > summary { color: #0000ee; }
:root[data-theme="light"] .styles-details > summary:hover { color: #a000a0; }

a.btn.green {
  background: #19b126;
}
a.btn.red {
  background: #ee0d45;
}
a.btn.pink {
  background: #e45d86;
}
a.btn.yellow {
  background: #f0e659;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: 2px solid #888;
}

th,
td {
  padding: 6px;
  text-align: left;
  border: 1px solid #555;
  vertical-align: top;
}

th {
  font-size: 14px;
  font-weight: bold;
  background-color: #222222;
  color: #ffffff;
}

code {
  font-family: "Courier New", Courier, monospace;
  background: #111111;
  color: #00ff00;
  padding: 1px 4px;
  border: 1px solid #333;
  font-size: 14px;
}

pre {
  background: #000000;
  color: #00ff00;
  padding: 10px;
  border: 2px inset #555;
  overflow-x: auto;
  font-size: 14px;
  white-space: pre;
}

pre code {
  white-space: nowrap;
}

td code {
  white-space: nowrap;
}

.embeds {
  display: grid;
  gap: 4px;
}

.embed-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.embed-row input {
  flex: 1;
  min-width: 0;
}

.embed-row button {
  padding: 4px 8px;
  font-size: 12px;
}

.flash {
  background: #003300;
  border: 2px solid #00ff00;
  padding: 8px 12px;
  margin-bottom: 16px;
  color: #00ff00;
  font-weight: bold;
}

.error {
  background: #330000;
  border: 2px solid #ff0000;
  padding: 8px 12px;
  margin-bottom: 16px;
  color: #ff0000;
  font-weight: bold;
  text-transform: uppercase;
}

.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hits {
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  color: #ffff00; /* Yellow for hits to stand out */
}

.muted {
  color: #808080;
  font-size: 12px;
}

.danger-zone {
  margin-top: 32px;
  padding: 12px;
  border: 2px dashed #ff0000;
  background: #1a0000;
}

.hint {
  font-weight: normal;
  font-size: 12px;
  color: #808080;
}

/* ── Counter create/edit form + style picker (counterForm.tsx) ──────────── */
.form-grid {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row.single {
  grid-template-columns: 1fr;
}

.form-row label {
  font-weight: bold;
  color: #c0c0c0;
}

.style-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  padding: 0;
  border: 0;
  margin: 0;
}

.style-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 10px 10px;
  border: 2px outset #555;
  cursor: pointer;
  background: #111111;
  position: relative;
}

.style-card:hover {
  background: #222222;
}

.style-card.selected {
  border: 2px inset #00ffff;
  background: #000080; /* Windows 95 selected background */
}

.style-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.style-card .thumb {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000; /* Frame for image */
  border: 1px solid #333;
  padding: 4px;
}

.style-card .thumb img {
  max-width: 100%;
  max-height: 52px;
  image-rendering: pixelated; /* Retro crunch */
}

.style-card .name {
  font-size: 14px;
  font-weight: bold;
  color: #ffffff;
}

.color-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.color-row input[type=color] {
  width: 42px;
  padding: 0;
  border: 2px inset #888;
  background: #000;
  cursor: pointer;
}

.color-row .clear-color {
  padding: 0 10px;
  background: #333;
  color: #fff;
  border: 2px outset #aaa;
  cursor: pointer;
  font-size: 12px;
}

.color-row .clear-color:active {
  border-style: inset;
}

.preview-pane {
  padding: 16px;
  background: #000000;
  border: 2px inset #888;
  text-align: center;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-pane img {
  display: block;
  max-width: 100%;
  max-height: 84px;
  image-rendering: pixelated;
}

.preview-title {
  font-size: 14px;
  color: #00ffff;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.preview-refresh {
  margin-top: 10px;
  width: 100%;
}

.form-with-preview {
  display: grid;
  gap: 24px;
  align-items: start;
}

@media (max-width: 720px) {
  .form-with-preview {
    grid-template-columns: 1fr;
  }
}

/* ── Landing page (pages/Home.tsx) ──────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 24px 0 32px;
  border-bottom: 3px double #555;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 48px;
  margin: 0 0 10px;
  text-decoration: blink; /* Web 1.0 magic */
  color: #00ff00;
}

.hero p {
  font-size: 20px;
  color: #c0c0c0;
  margin: 0;
}

.create-section {
  padding: 32px 36px;
  background: #111111;
  border: 2px outset #888;
  margin: 16px 0 40px;
}

.create-section h2 {
  margin: 0 0 6px;
  color: #ffffff;
}

.create-section .sub {
  color: #a0a0a0;
  margin: 0 0 24px;
  font-size: 16px;
}

.upgrade {
  padding: 32px 36px;
  background: #000080;
  border: 2px solid #ffffff;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.upgrade h2 {
  margin: 0 0 8px;
  color: #ffff00;
  text-transform: uppercase;
}

.upgrade ul {
  margin: 0;
  padding-left: 18px;
  color: #ffffff;
  font-family: "Courier New", Courier, monospace;
}

.cta {
  display: inline-block;
  padding: 12px 22px;
  background: #d40000; /* loud, but white text keeps it readable */
  color: #ffffff;
  border: 3px outset #ff8a8a;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
  white-space: nowrap;
  text-transform: uppercase;
}

.cta:hover {
  background: #b00000;
  border-style: inset;
}

@media (max-width: 600px) {
  .upgrade {
    grid-template-columns: 1fr;
  }
  .upgrade .cta {
    text-align: center;
  }
}

.showcase h2 {
  color: #ffffff;
  text-transform: uppercase;
  border-bottom: 1px solid #555;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.thumb-card {
  padding: 14px 10px;
  background: #111111;
  border: 2px outset #555;
  text-align: center;
}

.thumb-card .frame {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border: 1px solid #333;
}

.thumb-card .name {
  font-size: 14px;
  color: #c0c0c0;
  margin-top: 4px;
  font-family: "Courier New", Courier, monospace;
}

.embed-section h2 {
  color: #ffffff;
  text-transform: uppercase;
}

.embed-section pre {
  border: 2px inset #888;
}

.embed-section em {
  color: #ff00ff;
}

/* ── Style editor (pages/AdminStyles.tsx) ───────────────────────────────── */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}

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

.editor-grid label {
  color: #c0c0c0;
  font-weight: bold;
}

.placeholders {
  font-size: 14px;
  color: #c0c0c0;
  background: #111111;
  border: 2px outset #555;
  padding: 8px 10px;
  margin-bottom: 14px;
}

.placeholders code {
  background: #000000;
  color: #00ffff;
  border: 1px solid #00ffff;
}

.starters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.preview-box {
  position: sticky;
  top: 16px;
}

.preview-frame {
  padding: 16px;
  background: #000000;
  border: 2px inset #888;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-err {
  color: #ff0000;
  font-weight: bold;
  font-family: "Courier New", Courier, monospace;
}

.sample-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.insert-title {
  color: #ffffff;
  font-weight: bold;
}

.insert-group .insert-label {
  color: #a0a0a0;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 4px 9px;
  font-size: 14px;
  background: #333333;
  color: #ffffff;
  border: 2px outset #888;
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
}

.chip:active {
  border-style: inset;
}

.manage-fonts {
  color: #00ffff;
  text-decoration: underline;
}

/* Per-style image assets panel */
.asset-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.asset-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.asset-thumb {
  width: 28px;
  height: 28px;
  background: #000;
  border: 1px solid #555;
  image-rendering: pixelated;
}

.asset-del {
  background: #550000;
  color: #ff0000;
  border: 2px outset #ff0000;
  font-weight: bold;
}

.asset-del:active {
  border-style: inset;
}

/* ── Code Editor Highlight Matrix Colors ────────────────────────────────── */
/* A highlighted <pre> sits exactly behind a transparent-text <textarea>, kept
   in sync by style-editor.js. The metrics on the pre and the textarea MUST stay
   identical or the highlight drifts from the caret. (Until JS adds .hl-ready the
   textarea is a plain visible field, so it still works with JS disabled.) */
.code-editor { position: relative; }
.code-editor .code-editor-pre { display: none; }
.code-editor.hl-ready {
  border: 2px inset #888;
  background: #000000;
  overflow: hidden;
}
.code-editor.hl-ready .code-editor-pre,
.code-editor.hl-ready .code-editor-input {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px;
  border: 0;
  font: 14px/1.5 "Courier New", Courier, monospace;
  letter-spacing: 0;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
}
.code-editor.hl-ready .code-editor-pre {
  display: block;
  position: relative;
  min-height: 240px;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}
.code-editor.hl-ready .code-editor-pre code {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  font: inherit;
  color: #f0f0f0; /* base (untokenized) text — same white as punctuation */
  white-space: inherit;
  overflow-wrap: inherit;
  word-break: inherit;
  text-shadow: none;
}
.code-editor.hl-ready .code-editor-input {
  position: absolute;
  inset: 0;
  height: 100%;
  resize: none;
  overflow: hidden;
  outline: none;
  background: transparent;
  color: transparent;
  caret-color: #00ff00;
}
.code-editor.hl-ready .code-editor-input::selection {
  background: #000080;
  color: transparent;
}

.code-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-actions {
  display: flex;
  gap: 6px;
}

.code-btn,
.code-theme-toggle {
  background: #333;
  color: #fff;
  border: 2px outset #aaa;
}

.code-btn:active,
.code-theme-toggle:active {
  border-style: inset;
}

.preview-btn,
.preview-theme-toggle {
  background: #333;
  color: #fff;
  border: 2px outset #aaa;
}

.preview-btn:active,
.preview-theme-toggle:active {
  border-style: inset;
}

/* Prism Web 1.0 Dark Terminal Theme */
.code-editor .token.comment,
.code-editor .token.prolog,
.code-editor .token.doctype,
.code-editor .token.cdata {
  color: #808080;
}

.code-editor .token.punctuation {
  color: #f0f0f0; /* matches the untokenized base text */
}

.code-editor .token.property,
.code-editor .token.tag,
.code-editor .token.boolean,
.code-editor .token.number,
.code-editor .token.constant,
.code-editor .token.symbol,
.code-editor .token.deleted {
  color: #ff00ff; /* Magenta */
}

.code-editor .token.selector,
.code-editor .token.attr-name,
.code-editor .token.string,
.code-editor .token.char,
.code-editor .token.builtin,
.code-editor .token.inserted {
  color: #00ff00; /* Lime */
}

.code-editor .token.operator,
.code-editor .token.entity,
.code-editor .token.url {
  color: #ffff00; /* Yellow */
}

.code-editor .token.atrule,
.code-editor .token.attr-value,
.code-editor .token.keyword {
  color: #00ffff; /* Cyan */
}

.code-editor .token.function,
.code-editor .token.class-name {
  color: #ff0000; /* Red */
}

.code-editor .token.regex,
.code-editor .token.important,
.code-editor .token.variable {
  color: #ff8000; /* Orange */
}

/* ── Fonts page (pages/AdminFonts.tsx) ──────────────────────────────────── */
.font-upload {
  padding: 16px 18px;
  background: #111111;
  border: 2px outset #555;
  margin: 14px 0 28px;
}

.upload-status {
  font-size: 14px;
  color: #00ff00;
  font-family: "Courier New", Courier, monospace;
}

.font-sample {
  font-size: 24px;
  color: #ffffff;
}

.font-chips .fc {
  padding: 6px 12px;
  border: 2px outset #888;
  background: #222222;
  color: #ffffff;
}

/* ── Contact page + home "share an idea" box ────────────────────────────────── */
.ideas-box {
  padding: 24px 28px;
  background: #002b2b; /* dark teal panel */
  border: 2px solid #00ffff;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.ideas-box h2 {
  margin: 0 0 6px;
  border: 0;
  color: #00ffff;
  text-transform: uppercase;
}
.ideas-box p { color: #c0c0c0; }
@media (max-width: 600px) {
  .ideas-box { grid-template-columns: 1fr; }
  .ideas-box .cta { text-align: center; }
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
  max-width: 600px;
  margin: 16px 0 32px;
}
.contact-form label { font-weight: bold; }
.contact-form textarea { width: 100%; min-height: 150px; resize: vertical; }
.contact-form input[type=text],
.contact-form input[type=email] { width: 100%; }
@media (max-width: 600px) {
  .contact-form .form-row { grid-template-columns: 1fr; }
}
.hint-inline { font-weight: normal; font-size: 12px; color: #808080; }

/*homepage hitcounter box*/
.homepage-counter{
  padding: 24px 28px;
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.homepage-counter a {
  margin:auto;
}

/* Spam honeypot — off-screen, not display:none (bots skip display:none). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Draft / publish controls (admin styles) ────────────────────────────────── */
.tag-draft {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: bold;
  background: #808000;
  color: #ffffff;
  border: 1px solid #ffffff;
  text-transform: uppercase;
}
.publish-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 16px;
  border: 2px solid;
  font-size: 14px;
  font-weight: bold;
}
.publish-bar form { margin: 0; }
.publish-bar.draft { border-color: #808000; background: #1a1a00; color: #ffff80; }
.publish-bar.live { border-color: #008000; background: #001500; color: #80ff80; }

/* ── Image packs (admin) ────────────────────────────────────────────────────── */
.tag-builtin {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: bold;
  background: #334155;
  color: #ffffff;
  border: 1px solid #94a3b8;
  text-transform: uppercase;
}
.pack-upload {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
  margin: 16px 0;
  border: 2px dashed #444;
  background: #0d0d0d;
}
.pack-upload .hint { flex-basis: 100%; margin: 0; }
.pack-upload .preview-err { flex-basis: 100%; }

/* Manifest number fields, two-up. */
.num-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.num-grid label:last-child { grid-column: 1 / -1; }

/* Uploaded digit preview strip. */
.digit-strip-wrap { margin-top: 14px; }
.digit-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  margin: 4px 0;
  background: #111;
  border: 1px solid #333;
}
.digit-thumb {
  height: 40px;
  width: auto;
  image-rendering: pixelated;
  background: repeating-conic-gradient(#202020 0% 25%, #2a2a2a 0% 50%) 50% / 12px 12px;
}
.check-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  font-weight: bold;
}
.check-row input { width: auto !important; display: inline-block; margin: 0; }

:root[data-theme="light"] .pack-upload { background: #f4f4f5; border-color: #cbd5e1; }
:root[data-theme="light"] .digit-strip { background: #f9fafb; border-color: #d1d5db; }

/* ── LIGHT THEME ─────────────────────────────────────────────────────────────
   Dark (the rules above) is the site default. The nav toggle sets
   <html data-theme="light">, persisted in localStorage and applied pre-paint by
   /theme-init.js. This block re-skins the page for light mode as an override
   layer, so the dark design is never disturbed.

   Intentionally left dark in both themes: the image frames (so transparent /
   light-on-dark counter art stays visible), the code editor + Prism tokens, and
   the self-contained filled panels (navy upgrade box, badges, red CTA,
   flash/error/danger alert boxes) — they read fine on a light page too. */
:root[data-theme="light"] body { background-color: #e9e7e2; color: #1a1a1a; }

:root[data-theme="light"] nav { border-bottom-color: #b0ada6; }
:root[data-theme="light"] nav a,
:root[data-theme="light"] nav button.link { color: #0000ee; }
:root[data-theme="light"] nav a:hover,
:root[data-theme="light"] nav button.link:hover { color: #a000a0; }
:root[data-theme="light"] nav .who { color: #555555; }

:root[data-theme="light"] h1,
:root[data-theme="light"] h2,
:root[data-theme="light"] .create-section h2,
:root[data-theme="light"] .showcase h2,
:root[data-theme="light"] .embed-section h2,
:root[data-theme="light"] .insert-title,
:root[data-theme="light"] .style-card .name,
:root[data-theme="light"] .thumb-card .name,
:root[data-theme="light"] .font-sample { color: #000000; }
:root[data-theme="light"] h2 { border-bottom-color: #b0ada6; }
:root[data-theme="light"] .showcase h2,
:root[data-theme="light"] .hero { border-bottom-color: #b0ada6; }

:root[data-theme="light"] p.lede,
:root[data-theme="light"] .create-section .sub,
:root[data-theme="light"] .hero p,
:root[data-theme="light"] .insert-group .insert-label { color: #4a4a4a; }
:root[data-theme="light"] .muted,
:root[data-theme="light"] .hint,
:root[data-theme="light"] .hint-inline { color: #6a6a6a; }

:root[data-theme="light"] label,
:root[data-theme="light"] .form-row label,
:root[data-theme="light"] .editor-grid label { color: #1a1a1a; }

:root[data-theme="light"] input[type=text],
:root[data-theme="light"] input[type=password],
:root[data-theme="light"] input[type=email],
:root[data-theme="light"] input[type=number],
:root[data-theme="light"] select,
:root[data-theme="light"] textarea,
:root[data-theme="light"] pre {
  background-color: #ffffff;
  color: #0a5d00;
  border-color: #b0ada6;
}
:root[data-theme="light"] input:focus,
:root[data-theme="light"] textarea:focus { outline-color: #0000ee; }

:root[data-theme="light"] code {
  background: #f2f0ea;
  color: #0a5d00;
  border-color: #d6d2c8;
}

:root[data-theme="light"] button,
:root[data-theme="light"] .color-row .clear-color,
:root[data-theme="light"] .chip,
:root[data-theme="light"] .starters button,
:root[data-theme="light"] .font-chips .fc {
  background: #e0ddd6;
  color: #1a1a1a;
  border-color: #cfccc4;
}
:root[data-theme="light"] button.subtle { background: #cbc8c0; }
:root[data-theme="light"] a.btn.subtle { background: #cbc8c0; color: #000; }
/* button.danger keeps its maroon fill (white text) — readable on both. */

:root[data-theme="light"] table { border-color: #b0ada6; }
:root[data-theme="light"] th,
:root[data-theme="light"] td { border-color: #cfccc4; }
:root[data-theme="light"] th { background-color: #ddd9d0; color: #1a1a1a; border-color: #cfccc4; }

:root[data-theme="light"] .hits { color: #8a6d00; }

:root[data-theme="light"] .create-section,
:root[data-theme="light"] .thumb-card,
:root[data-theme="light"] .style-card,
:root[data-theme="light"] .placeholders,
:root[data-theme="light"] .font-upload { background: #ffffff; border-color: #cfccc4; }
:root[data-theme="light"] .style-card:hover { background: #f1efe9; }
:root[data-theme="light"] .style-card.selected { background: #cfe2ff; border-color: #0000aa; }

:root[data-theme="light"] .preview-title { color: #0000cc; }
:root[data-theme="light"] .manage-fonts { color: #0000ee; }
:root[data-theme="light"] .placeholders code {
  background: #ffffff;
  color: #0000cc;
  border-color: #0000cc;
}
:root[data-theme="light"] .hero h1 { color: #2b2b2b; }
:root[data-theme="light"] .embed-section em { color: #a000a0; }
:root[data-theme="light"] .upload-status { color: #0a5d00; }

/* Image frames + the colour swatch are dark by default to frame the art; in
   light mode lighten them so they don't read as stray black boxes. (The code
   editor stays dark on purpose — its neon Prism palette needs a black ground.) */
:root[data-theme="light"] .preview-pane,
:root[data-theme="light"] .preview-frame,
:root[data-theme="light"] .style-card .thumb,
:root[data-theme="light"] .thumb-card .frame,
:root[data-theme="light"] .asset-thumb,
:root[data-theme="light"] .color-row input[type=color] {
  background: #ffffff;
  border-color: #cfccc4;
}

/* The two bottom panels read better as light cards in light mode. The red CTA
   (white text) stays loud and readable on both. */
:root[data-theme="light"] .upgrade {
  background: #eaf0ff;
  border-color: #9bb4e6;
}
:root[data-theme="light"] .upgrade h2 { color: #14245f; }
:root[data-theme="light"] .upgrade ul,
:root[data-theme="light"] .upgrade p { color: #2a2a2a; }

:root[data-theme="light"] .ideas-box {
  background: #e4f3f1;
  border-color: #4fb0a8;
}
:root[data-theme="light"] .ideas-box h2 { color: #0a5a52; }
:root[data-theme="light"] .ideas-box p { color: #2f3a39; }

/* The little theme toggle reads as a plain nav link. */
.theme-toggle { white-space: nowrap; }

