/* ampixa demo — same type, palette and rhythm as ampixa.com, plus pixel panels. */
:root {
  --ink: #111;
  --bg: #fff;
  --muted: #555;
  --muted2: #666;
  --faint: #888;
  --line: lightgrey;
  --rule: #ccc;
  --paper: #f6f6f6;
  --accent: #DC143C;
  --ok: #1f8a3b;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Lucida Console', Monaco, monospace;
  font-size: 18px;
  color: var(--ink);
  background-color: var(--bg);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 50px 40px;
  line-height: 1.55;
}
a { color: var(--accent); }
a:hover { text-decoration: underline; }
h2 { font-weight: bold; font-size: 22px; margin: 0 0 16px; }
h3 { font-weight: bold; font-size: 18px; margin: 0 0 10px; }
p { margin: 0 0 16px; }
b { font-weight: bold; }
hr { border: none; height: 2px; background-color: var(--line); width: 100%; margin: 40px auto; }
code, pre { font-family: 'Lucida Console', Monaco, monospace; }
pre { background: var(--paper); padding: 10px 12px; font-size: 14px; overflow-x: auto; }
img.px { image-rendering: pixelated; image-rendering: crisp-edges; }

/* landing */
.landing { text-align: center; padding-top: 52px; }
.landing h1 { margin: 0; }
.wordmark, .wordmark-dev { display: block; margin: 0 auto; height: auto; }
.wordmark { width: clamp(240px, 46vw, 520px); }
.wordmark-dev { width: clamp(190px, 32vw, 360px); margin-top: 24px; }
.hero { display: block; width: 100%; max-width: 960px; height: auto; margin: 26px auto 0; }
.tagline { margin-top: 20px; color: var(--muted); font-size: 16px; }
.tagline .accent { color: var(--accent); }
.pill {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase;
  background: var(--accent); color: #fff; vertical-align: middle; margin-right: 6px;
}
.pill.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.pill.mute { background: #eee; color: var(--muted2); }
.links-container { font-size: 20px; margin: 26px 0 8px; }
.links-container a { text-decoration: none; margin: 0 8px; color: inherit; }
.links-container a:hover { color: var(--accent); }
.separator { letter-spacing: -9px; color: var(--rule); }

/* status strip */
.status { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 18px; font-size: 14px; color: var(--muted2); }
.status .dot { display: inline-block; width: 10px; height: 10px; background: #bbb; margin-right: 6px; vertical-align: middle; }
.status .dot.on { background: var(--ok); }
.status .dot.off { background: var(--accent); }
.status .dot.loading { background: #e0a400; }

/* sections: glyph left, content right (like ampixa.com .work-item) */
.section { display: flex; gap: 28px; align-items: flex-start; }
.section .glyph { width: 96px; height: 96px; flex: 0 0 96px; image-rendering: pixelated; image-rendering: crisp-edges; margin-top: -6px; }
.section .body { flex: 1 1 auto; min-width: 0; }
.lead { color: var(--muted2); font-size: 16px; }
.small { font-size: 14px; color: var(--muted2); }
.quiet { color: var(--faint); }

/* pixel panel */
.panel {
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  padding: 18px 20px;
  margin: 18px 0 24px;
  background: var(--bg);
}
.panel + .panel { margin-top: 30px; }
.row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 12px; }
.row label { color: var(--muted2); font-size: 15px; }
.grow { flex: 1 1 260px; }

/* controls */
button, .btn {
  font-family: inherit; font-size: 16px; font-weight: bold;
  padding: 8px 18px; border: 2px solid var(--ink); background: var(--bg); color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink); cursor: pointer; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--paper); text-decoration: none; }
button:active, .btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
button:disabled { color: var(--faint); border-color: var(--faint); box-shadow: 3px 3px 0 var(--faint); cursor: default; }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 3px 3px 0 var(--ink); }
button.primary:hover { background: #c0112f; }
button.primary.live { animation: blink 1s steps(2, start) infinite; }
button.link { border: none; box-shadow: none; padding: 0; font-weight: normal; color: var(--accent); background: none; }
button.link:hover { text-decoration: underline; background: none; }
button.link:active { transform: none; }
@keyframes blink { to { visibility: hidden; } }
textarea, input[type=text], select {
  font-family: inherit; font-size: 17px; color: var(--ink); background: var(--bg);
  border: 2px solid var(--ink); padding: 8px 10px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
select { width: auto; max-width: 100%; }
input[type=range] { accent-color: var(--accent); }
.out {
  border: 2px dashed var(--rule); padding: 12px 14px; min-height: 52px; margin-top: 12px;
  white-space: pre-wrap; word-break: break-word; line-height: 1.6;
}
.out.big { font-size: 22px; }
.out:empty::before { content: attr(data-empty); color: var(--faint); }
.err { color: var(--accent); }
.meta { color: var(--faint); font-size: 13px; margin-top: 6px; }
audio { width: 100%; max-width: 520px; height: 34px; vertical-align: middle; margin-top: 10px; display: block; }

/* level meter (ASR) */
.meter { display: inline-flex; gap: 3px; height: 28px; align-items: flex-end; vertical-align: middle; margin-left: 12px; }
.meter i { display: block; width: 8px; height: 4px; background: var(--rule); }
.meter i.on { background: var(--accent); }

/* voice picker */
.voice-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px 22px; margin-bottom: 14px; }
.voice-group h3 { margin-bottom: 6px; font-size: 16px; }
.voice-group .sub { color: var(--faint); font-size: 13px; margin-bottom: 6px; }
.voice-group label { display: block; font-size: 15px; padding: 2px 0; cursor: pointer; }
.voice-group input { accent-color: var(--accent); margin-right: 8px; }
.voice-note { font-size: 13px; color: var(--muted2); margin-top: 8px; }

/* OCR */
.drop { border: 2px dashed var(--ink); padding: 26px; text-align: center; color: var(--muted2); cursor: pointer; }
.drop.over { background: var(--paper); }
.ocr-result[hidden] { display: none; }
.ocr-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 14px; }
.ocr-result img { max-width: 100%; border: 2px solid var(--ink); display: block; }
.ocr-lines { font-size: 15px; }
.ocr-lines .l { display: flex; gap: 10px; padding: 3px 0; border-bottom: 1px solid #eee; }
.ocr-lines .c { color: var(--faint); font-size: 12px; flex: 0 0 48px; }
.samples { display: flex; flex-wrap: wrap; gap: 8px; }
.samples img { height: 56px; max-width: 100%; border: 2px solid var(--ink); cursor: pointer; image-rendering: auto; }
.samples img:hover { box-shadow: 3px 3px 0 var(--ink); }

/* keyboard */
.kbd { user-select: none; margin-top: 12px; }
.kbd .krow { display: flex; gap: 5px; margin-bottom: 5px; justify-content: center; }
.kbd .key {
  min-width: 44px; height: 46px; padding: 0 6px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); background: var(--bg); cursor: pointer;
  font-size: 20px; font-family: inherit;
}
.kbd .key.wide { min-width: 70px; font-size: 14px; }
.kbd .key.space { min-width: 200px; font-size: 14px; color: var(--muted2); }
.kbd .key.act { font-size: 14px; background: var(--paper); }
.kbd .key.held { background: var(--accent); color: #fff; }
.kbd .key:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.kbd .qwerty { display: block; font-size: 9px; color: var(--faint); margin-left: 4px; align-self: flex-start; }

/* tables */
table { border-collapse: collapse; text-align: left; width: 100%; font-size: 15px; }
td, th { padding: 6px 18px 6px 0; vertical-align: top; border-bottom: 1px solid #eee; }
th { color: var(--muted2); font-weight: normal; }
td:first-child { white-space: nowrap; color: var(--muted2); }

/* cards (grammar, links) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { border: 2px solid var(--ink); padding: 14px 16px; box-shadow: 4px 4px 0 var(--ink); }
.card h3 { font-size: 16px; margin-bottom: 6px; }
.card p { font-size: 15px; margin-bottom: 8px; }
.card .tag { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .5px; }

.copyright { text-align: center; color: var(--faint); margin: 40px 0 40px; font-size: 14px; }

@media (max-width: 720px) {
  body { font-size: 16px; padding: 0 22px 30px; }
  .section { flex-direction: column; gap: 10px; }
  .section .glyph { width: 56px; height: 56px; flex-basis: 56px; margin-top: 0; }
  .links-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 2px; font-size: 17px; }
  .links-container a { margin: 0 4px; }
  .separator { letter-spacing: 0; margin: 0 2px; }
  .panel { padding: 14px; box-shadow: 4px 4px 0 var(--ink); }
  .ocr-result { grid-template-columns: 1fr; }
  .kbd .key { min-width: 30px; height: 40px; font-size: 17px; padding: 0 3px; }
  .kbd .key.space { min-width: 90px; }
  .kbd .qwerty { display: none; }
  .samples img { height: 44px; }
  select { width: 100%; max-width: 100%; min-width: 0; }
  .section .body, .panel { max-width: 100%; overflow-x: hidden; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  td { padding: 3px 0; border: none; }
  tr { margin-bottom: 12px; border-bottom: 1px solid #eee; }
}
