/* King Kang: a teletext page in the colours of a kangaroo. */

@font-face {
  font-family: "Share Tech Mono";
  src: url("/fonts/share-tech-mono-latin.woff2") format("woff2");
  font-display: swap;
  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;
}

:root {
  --bg: #1a120d;        /* the dark of the nose and eyes */
  --panel: #2d2018;
  --cream: #f3e4c8;     /* muzzle */
  --fur: #c4874f;       /* coat */
  --fur-light: #e8aa6a;
  --ear: #8c5a35;       /* inside the ears */
  --grey: #c9c4bb;      /* the office behind */
  --gold: #e2ae4a;      /* the crown */
  --ink: #231812;
  --error: #ff8f7d;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font: 26px/1.4 "Share Tech Mono", "Courier New", monospace;
  -webkit-text-size-adjust: 100%;
}

.screen {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px max(16px, 6vw) 48px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #fff7ea; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

h1, h2, p { margin: 0; }
h2 { font-size: inherit; font-weight: 400; }

.fur { color: var(--fur-light); }
.cream { color: var(--cream); }
.grey { color: var(--grey); }
.gold { color: var(--gold); }

/* Header row: page number, service name, live clock. */
.bar { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 0.92em; }
.clock { margin-left: auto; color: var(--grey); font-variant-numeric: tabular-nums; }

/* The block-graphics strip under the header. */
.mosaic { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); height: 18px; }
.mosaic .a { background: var(--fur); }
.mosaic .b { background: var(--cream); }
.mosaic .c { background: var(--ear); }
.mosaic .d { background: var(--grey); }
.mosaic .e { background: var(--gold); }
.mosaic .f { background: var(--fur-light); }

.hero { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.band { flex: 1 1 480px; min-width: 0; background: var(--fur); color: var(--ink); padding: 18px 24px 22px; }
/* Teletext double-height text. */
.band h1 {
  font-size: 52px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.04em;
  height: 100px;
  transform: scaleY(1.9);
  transform-origin: top left;
}
.roo { width: 144px; height: 144px; flex: 0 0 auto; image-rendering: pixelated; }

.fields { display: flex; flex-wrap: wrap; gap: 4px 28px; }

.index { display: flex; flex-direction: column; gap: 2px; }
.index a, .row { display: flex; align-items: baseline; gap: 12px; min-height: 44px; }
.dots { flex: 1; min-width: 24px; border-bottom: 3px dotted var(--cream); opacity: 0.4; }

/* X's own embed fills this box with your latest posts. The link shows until it loads, or if it can't. */
.posts { display: flex; flex-direction: column; gap: 8px; }
.timeline { max-width: 520px; min-height: 44px; }
.timeline > a { color: var(--fur-light); text-decoration: underline; }

.contact { display: flex; flex-direction: column; gap: 12px; }
.pair { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.pair .field { flex: 1 1 260px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 4px; }
label { color: var(--grey); font-size: 0.85em; }
input, textarea {
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  font: inherit;
  color: var(--cream);
  background: var(--panel);
  border: 0;
  border-bottom: 3px solid var(--fur-light);
  border-radius: 0;
}
textarea { resize: vertical; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
button {
  min-height: 44px;
  padding: 0 28px;
  font: inherit;
  color: var(--ink);
  background: var(--fur);
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
button:hover { background: var(--fur-light); }
button:disabled { opacity: 0.6; cursor: wait; }
.note { color: var(--grey); font-size: 0.85em; }
.note.ok { color: var(--fur-light); }
.note.bad { color: var(--error); }

/* The four coloured keys along the bottom. */
.fastext { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.fastext a { min-height: 44px; display: flex; align-items: center; }

.message { display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 600px) {
  body { font-size: 20px; }
  .band h1 { font-size: 40px; height: 78px; }
  .roo { width: 112px; height: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
