/* NomadOS 2001 - "TouchCounter" design system.
   The POS that shipped on CRT touchscreens in an alternate 2001. One file for the shop app, Link Hub and the website.
   Look: dark phosphor glass behind gray bevelled windows, navy-to-cyan title bars, big square touch keys,
   green LCD readouts for numbers, Tech Nomad orange for the one "TOTAL" action on a screen.
   Rules: text stays readable (17px, high contrast), every touch target >= 48px, effects never cover content,
   nothing animates for people who ask for reduced motion, print is plain paper. */

@font-face { font-family: "NomadLCD"; src: url("vt323.woff2") format("woff2"); font-display: swap; }

:root {
  --glass: #0d1b24;       /* CRT glass behind everything */
  --glass2: #133140;
  --panel: #c9c6bd;       /* warm 2001 beige-gray plastic */
  --panel-hi: #f4f2ec;
  --panel-lo: #858175;
  --edge: #1d1c19;
  --field: #fffef8;
  --ink: #141414;
  --muted: #4c4a44;
  --navy: #0a1f73;
  --cyan: #1a8fd0;
  --total: #d2501b;       /* the TOTAL key: one per screen */
  --total-lo: #8f3410;
  --lcd-bg: #07140b;
  --lcd: #4dff7a;
  --amber: #ffb000;
  --ok: #1f9d3a; --bad: #c42b1c;
  --r: 6px;               /* 2001 kiosks had slightly rounded plastic */
  --ui: Tahoma, Verdana, "DejaVu Sans", "Segoe UI", sans-serif;
  --mono: "Courier New", Courier, "Liberation Mono", monospace;
  --lcdf: "NomadLCD", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 17px/1.5 var(--ui);
  background: radial-gradient(ellipse at 50% 0%, var(--glass2), var(--glass) 70%) fixed, var(--glass);
  min-height: 100vh;
}
/* the CRT: faint scanlines and a vignette, above everything but never clickable */
body.crt::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1000;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,.07) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.35) 100%);
}
body.crt.soft::after { background: repeating-linear-gradient(0deg, rgba(0,0,0,.035) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 70%, rgba(0,0,0,.25) 100%); }
a { color: var(--navy); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; }
.wrap { max-width: 66rem; margin: 0 auto; padding: 0 .9rem; }

/* ---------- bevels ---------- */
.raised, .win, .key, .btn, button {
  background: var(--panel); border: 2px solid; border-color: var(--panel-hi) var(--edge) var(--edge) var(--panel-hi);
  box-shadow: inset -1px -1px var(--panel-lo), inset 1px 1px #fff;
}
.sunken, input, textarea, select, .well {
  background: var(--field); border: 2px solid; border-color: var(--panel-lo) var(--panel-hi) var(--panel-hi) var(--panel-lo);
  box-shadow: inset 1px 1px var(--edge);
}

/* ---------- windows ---------- */
.win { border-radius: var(--r); padding: 3px; margin: 0 0 1rem; }
.tb {                                   /* title bar */
  display: flex; align-items: center; gap: .5rem; min-height: 2.1rem; padding: .25rem .35rem .25rem .7rem;
  background: linear-gradient(90deg, var(--navy), var(--cyan)); color: #fff; font-weight: 700; font-size: 1rem;
  border-radius: calc(var(--r) - 2px) calc(var(--r) - 2px) 0 0;
}
.tb > span:not(.ico), .tb > h1, .tb > h2 { flex: 1; margin: 0; font-size: inherit; }
.tb .ico { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 3px; background: var(--total); box-shadow: inset -2px -2px rgba(0,0,0,.3); }
.tb i { font: 700 12px/1 var(--ui); font-style: normal; width: 22px; height: 20px; display: inline-grid; place-items: center;
  color: #000; background: var(--panel); border: 1px solid; border-color: #fff var(--edge) var(--edge) #fff; }
.body { padding: .9rem 1rem 1.1rem; }
.menu { display: flex; flex-wrap: wrap; padding: .1rem .4rem; border-bottom: 1px solid var(--panel-lo); box-shadow: 0 1px #fff; }
.menu a { color: #000; text-decoration: none; padding: .35rem .65rem; font-size: .95rem; }
.menu a::first-letter { text-decoration: underline; }
.menu a:hover, .menu a.on { background: var(--navy); color: #fff; }
.sbar { display: flex; gap: 3px; margin-top: 3px; }
.sbar > * { flex: 1; padding: .2rem .55rem; font-size: .85rem; background: var(--panel); }
.sbar > *:last-child { flex: 0 0 auto; }

/* ---------- touch keys (POS register buttons) ---------- */
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .55rem; }
.key {
  display: flex; flex-direction: column; justify-content: space-between; gap: .35rem; min-height: 7.5rem;
  padding: .7rem .75rem; color: #000; text-decoration: none; border-radius: var(--r); cursor: pointer; text-align: left;
  font: inherit;
}
.key b { font-size: 1.05rem; line-height: 1.2; }
.key small { font-size: .86rem; color: var(--muted); flex: 1; }
.key .glyph { font-size: 1.6rem; line-height: 1; }
.key:active, .btn:active, button:active, .key.on {
  border-color: var(--edge) var(--panel-hi) var(--panel-hi) var(--edge); box-shadow: inset 1px 1px var(--panel-lo);
}
.key.on { background: #b7b3a8; }
.key.total, .btn.total, button.total {
  background: var(--total); color: #fff; border-color: #ffb08c var(--total-lo) var(--total-lo) #ffb08c;
  box-shadow: inset -1px -1px var(--total-lo), inset 1px 1px #ff8a57;
}
.key.total small { color: #ffe3d6; }

/* ---------- buttons ---------- */
.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px;
  padding: .55rem 1.15rem; color: #000; font: 700 1rem var(--ui); text-decoration: none; cursor: pointer;
  border-radius: var(--r);
}
.btn:focus-visible, button:focus-visible, .key:focus-visible, a:focus-visible { outline: 2px dotted #000; outline-offset: 2px; }
button[disabled] { opacity: .6; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: .55rem; }

/* ---------- LCD readouts (all money and counts) ---------- */
.lcd {
  display: inline-block; font: 1.35rem/1 var(--lcdf); letter-spacing: .04em; color: var(--lcd); background: var(--lcd-bg);
  padding: .3rem .55rem .2rem; border-radius: 3px; text-shadow: 0 0 6px rgba(77,255,122,.55);
  border: 2px solid; border-color: var(--panel-lo) var(--panel-hi) var(--panel-hi) var(--panel-lo);
}
.lcd.big { font-size: 2.3rem; padding: .4rem .7rem .25rem; }
.lcd.amber { color: var(--amber); text-shadow: 0 0 6px rgba(255,176,0,.5); }

/* ---------- forms ---------- */
input, textarea, select { font: 17px var(--mono); padding: .55rem .6rem; color: var(--ink); width: 100%; border-radius: 2px; min-height: 44px; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
input[type=file] { border: 0; box-shadow: none; background: none; padding: 0; min-height: 0; font: inherit; }
input[type=checkbox] { width: 1.4rem; height: 1.4rem; min-height: 0; accent-color: var(--navy); }
label { display: grid; gap: .25rem; font-size: .95rem; }
fieldset { border: 2px groove #f6f4ee;
  margin: 0; padding: .5rem .9rem .85rem; border-radius: 3px; }
legend { padding: 0 .35rem; font-weight: 700; }

/* ---------- list view tables ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--field);
  border: 2px solid; border-color: var(--panel-lo) var(--panel-hi) var(--panel-hi) var(--panel-lo); }
th, td { text-align: left; padding: .5rem .6rem; vertical-align: top; border-bottom: 1px solid #e3e0d6; }
th { background: var(--panel); font-size: .9rem; border: 1px solid; border-color: #fff var(--panel-lo) var(--panel-lo) #fff; white-space: nowrap; }
tr:nth-child(even) td { background: #f6f4ec; }
td.num, th.num, .num { text-align: right; white-space: nowrap; }
td.price { font-family: var(--mono); font-weight: 700; white-space: nowrap; text-align: right; }

/* ---------- photos ---------- */
.photo { padding: 4px; margin: 0; }
.photo img { width: 100%; height: auto; }
.photo figcaption, .photo p { margin: .3rem .2rem 0; font-size: .85rem; color: var(--muted); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .6rem; }
.photos .photo img { aspect-ratio: 1; object-fit: cover; }

/* ---------- small parts ---------- */
.checks { list-style: none; padding: 0; margin: .4rem 0 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .3rem .9rem; }
.checks li::before { content: "\2714"; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: .45rem;
  font-size: 12px; background: #fff; border: 2px solid; border-color: var(--panel-lo) #fff #fff var(--panel-lo); vertical-align: -2px; }
.tag { display: inline-block; font: 700 .78rem var(--ui); text-transform: uppercase; letter-spacing: .04em; padding: .1rem .45rem;
  border: 1px solid var(--edge); background: var(--field); border-radius: 2px; white-space: nowrap; }
.muted { color: var(--muted); font-size: .92rem; }
.sig { font-family: var(--mono); font-weight: 700; color: var(--navy); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.dot { display: inline-block; width: .75rem; height: .75rem; border: 1px solid #000; margin-right: .35rem; vertical-align: middle; }
.dot.on { background: #2ee05a; box-shadow: 0 0 6px #2ee05a; } .dot.off { background: var(--bad); } .dot.net { background: var(--panel); }
.toast { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1001; }

/* ---------- desktop footer text on the glass ---------- */
.glassnote { color: #a9c3cf; text-align: center; font-size: .9rem; padding: .5rem 0 2rem; }
.glassnote a { color: #d7ecf5; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 .4rem; }
  .body { padding: .75rem .7rem .9rem; }
  .keys { grid-template-columns: 1fr 1fr; }
  .key { min-height: 6.5rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  body { background: #fff; } body.crt::after { display: none; }
  .win, .raised { box-shadow: none; border: 1px solid #999; background: #fff; }
  .tb { background: none; color: #000; border-bottom: 2px solid #000; }
  .menu, .btn, .keys, .sbar { display: none; }
}
