/* The look of Chromagistro, taken from the Synthara Forge site: a deep green
   ground, metal hairlines, thin wide-spaced capitals for headings and buttons,
   panels with clipped corners. One look only, no light version: the canvas is
   the bright thing on the page, as a painting is in a gallery.
   Every page links this file after its own styles, so it has the last word.
   Reading text stays in ordinary sentence case: only headings, labels and
   buttons are capitals. Fonts are the ones already on the device.

   The metal comes in two finishes, and everything metal is drawn from the
   few values below, so the finish is changed in one place:
     chrome  (the default)  cool polished silver: this is CHROMagistro
     bronze  (html class "bronze", set by look.js)  warm copper, as on the Brazen Heads
   Neither is a flat colour. Bronze has a bright top, a dark band across the
   middle and a lit lower edge. Chrome is kept bright all the way down, with a
   pale cool band and a narrow angled streak of reflection: lit, not shadowed,
   so the name and the buttons stay easy to read. */
:root {
  color-scheme: dark;
  --bg: #0b1c1b; --panel: #102a27; --text: #d9ece6; --soft: #9cc2b8;
  --deep: #0b1c1b; --bad: #f2a38f; --warn: #f0c27a; --notch: 12px;
  /* chrome */
  --metal: #c2cfd7; --metal-lite: #dbe5ea; --metal-hi: #ffffff;
  --metal-text: linear-gradient(102deg, rgba(255,255,255,0) 0 38%, rgba(255,255,255,0.95) 47%, rgba(255,255,255,0) 56% 100%), linear-gradient(180deg, #ffffff 0%, #eef3f6 30%, #c3ced6 50%, #aebbc4 56%, #e3eaee 70%, #ffffff 100%);
  --metal-fill: linear-gradient(102deg, rgba(255,255,255,0) 0 30%, rgba(255,255,255,0.85) 42%, rgba(255,255,255,0) 54% 100%), linear-gradient(180deg, #ffffff 0%, #e9eff2 38%, #c9d3d9 52%, #bcc7ce 58%, #dfe7eb 80%, #f8fafb 100%);
  --metal-glow: rgba(214, 228, 236, 0.85); --metal-shade: rgba(160, 180, 192, 0.5);
  --line: rgba(179, 193, 202, 0.4); --accent: #dbe5ea;
}
html.bronze {
  --metal: #e08a52; --metal-lite: #f0a878; --metal-hi: #ffd0a8;
  --metal-text: linear-gradient(180deg, #ffd0a8, #f0a878 45%, #9a4f24 62%, #f0a878);
  --metal-fill: linear-gradient(180deg, #f6b98c, #e08a52 55%, #c9733d 62%, #eea06a);
  --metal-glow: rgba(240, 168, 120, 0.85); --metal-shade: rgba(224, 138, 82, 0.5);
  --line: rgba(224, 138, 82, 0.42); --accent: #f0a878;
}
html { background: #0b1c1b; }
body {
  background: radial-gradient(120% 70% at 50% 0, #17403b, #0b1c1b 60%) fixed, #0b1c1b;
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}
main { padding-top: 30px; }
::selection { background: var(--metal); color: var(--deep); }

/* headings: thin capitals in polished metal */
h1, #front h2, .big {
  font-weight: 300; text-transform: uppercase; line-height: 1.2;
  background: var(--metal-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
h1 { letter-spacing: 0.14em; }
h2, .three b, .cap {
  font: 600 11.5px/1.4 "Segoe UI", system-ui, sans-serif; letter-spacing: 0.26em; text-transform: uppercase; color: var(--metal);
}
#front h2 { font: 300 clamp(24px, 4.4vw, 40px)/1.2 "Segoe UI", system-ui, sans-serif; letter-spacing: 0.12em; max-width: 24ch; }
p.sub, .soft, .small { color: var(--soft); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--metal-hi); }

/* panels: a metal hairline and clipped corners */
.card, a.card, .lesson, figure, .frame, #front li, .box, .three div, .item, .door, .points li, .tile {
  border-radius: 0; border-color: var(--line); background-color: var(--panel);
}
.card, .lesson, figure, .frame, #front li, .box, .door, .points li, a.card.plain {
  clip-path: polygon(var(--notch) 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, var(--notch) 100%, 0 calc(100% - var(--notch)), 0 var(--notch));
}
.lesson a.card, .lesson .card { clip-path: none; background: none; }
a.card:hover, .lesson:hover, .door:hover { border-color: var(--metal-hi); }
a.card b, .lesson b, figcaption b { font-weight: 600; letter-spacing: 0.02em; color: var(--text); }
a.card em, .cap em, #lv, .door em { font: 600 11px/1.4 "Segoe UI", system-ui, sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: var(--metal); }
canvas, .pic, figure img, .thumbs img, a.card canvas { border-radius: 0; }
.wrap, .pic { outline: 1px solid var(--line); outline-offset: 5px; margin: 6px; }
.wrap canvas { border-radius: 0; }

/* buttons: outlined capitals; the main one is filled metal */
button, a.go, .go, .tabs button, a.buy {
  font: 600 12.5px/1.2 "Segoe UI", system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 0; border: 1px solid var(--metal); background: transparent; color: var(--accent);
  padding: 11px 16px; cursor: pointer; text-decoration: none; transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
button:hover:not(:disabled), a.go:hover, .tabs button:hover { box-shadow: inset 0 0 30px -8px var(--metal-shade); color: var(--metal-hi); }
button.on, button.main, a.go, .go, .tabs button.on, #front a.go {
  background: var(--metal-fill); color: var(--deep); border-color: var(--metal-lite);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}
button.on:hover:not(:disabled), button.main:hover:not(:disabled), a.go:hover, .go:hover { color: var(--deep); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0 34px -10px var(--metal-glow); }
#front a.go.second, a.go.second { background: transparent; color: var(--accent); border: 1px solid var(--metal); box-shadow: none; }
button:disabled { opacity: 0.4; cursor: default; }
button.plain { border: 0; padding: 0; letter-spacing: 0.04em; text-transform: none; font-weight: 400; font-size: 15px; color: var(--soft); text-decoration: underline; }
a.buy, .lesson a.buy { border: 0; padding: 0; margin-top: 10px; font-size: 11.5px; letter-spacing: 0.16em; }
.levels button { width: 44px; padding: 9px 0; }
.thumbs button { text-transform: uppercase; letter-spacing: 0.14em; font-size: 10.5px; padding: 5px; border-color: var(--line); color: var(--soft); }
.thumbs button.on { background: var(--panel); color: var(--accent); border-color: var(--accent); box-shadow: none; }
.tabs { gap: 6px; }
:focus-visible { outline: 2px solid var(--metal-hi) !important; outline-offset: 3px; }

/* form parts */
input, select, textarea { border-radius: 0 !important; border: 1px solid var(--line) !important; background: #0d2321 !important; color: var(--text) !important; }
input[type=range] { accent-color: var(--metal); border: 0 !important; background: none !important; }
input[type=checkbox] { accent-color: var(--metal); }

/* the lesson's words and its small labels */
#what, .talk { color: var(--text); }
#what.open, .talk.open { color: var(--accent); }
#why, .now-why { color: var(--soft); }
.tag, .chip { border-radius: 0 !important; }
.tag { letter-spacing: 0.14em; text-transform: uppercase; font-size: 10.5px !important; }
details.how summary, details.why summary { color: var(--accent); }
#note { border-left: 2px solid var(--metal); padding-left: 12px; color: var(--soft); }
#stage, #where { letter-spacing: 0.1em; text-transform: uppercase; font-size: 12px; color: var(--metal); }
#msg.bad { color: var(--bad); } #msg.good { color: var(--accent); }
footer { border-top: 1px solid var(--line); color: var(--soft); }

/* the front page */
main > h1:first-child { font-size: clamp(30px, 6vw, 46px); margin-bottom: 8px; }
.hero h1 { letter-spacing: 0.18em; filter: drop-shadow(0 0 14px rgba(214, 228, 236, 0.28)); }
html.bronze .hero h1 { filter: none; }
.ask h2 { font: 300 clamp(20px, 3.6vw, 30px)/1.2 "Segoe UI", system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.door b { background: var(--metal-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card h2, .card > h2 { color: var(--metal); }

/* the small trademark sign beside the name, once, on the front page */
.tm { font-size: 0.38em; vertical-align: 1.15em; margin-left: 0.12em; letter-spacing: 0; font-weight: 400; line-height: 0; }

/* the name at the top of every page */
.brandbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; font: 600 11.5px/1 "Segoe UI", system-ui, sans-serif; letter-spacing: 0.26em; text-transform: uppercase; color: var(--metal); }
.brandbar a { color: var(--metal); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brandbar img { width: 26px; height: 26px; display: block; outline: 1px solid var(--line); outline-offset: 2px; }
.brandbar span { color: var(--soft); letter-spacing: 0.2em; }

@media print { body { background: #fff; color: #000; } h1 { color: #000; background: none; -webkit-text-fill-color: #000; } }
@media (max-width: 560px) { :root { --notch: 9px; } h1 { letter-spacing: 0.1em; } button, a.go, .tabs button { padding: 10px 12px; letter-spacing: 0.1em; } }
