/* Shared by every page. Layout: a 1996 corporate site. A white page with two
   columns: on the left, a stack of glossy oval buttons and a row of dots; on
   the right, the wordmark in a speech bubble. On the home page the bubble's
   tail points down at the cassette recorder, with the lead story and About
   below a rule; on Support and Privacy it points at the page's text, which
   is all open. Every page ends with a text menu, the copyright and operator,
   and the date the page's content was last reviewed.
   Fonts are system fonts only, so the site makes no third-party requests. */
:root {
  --page: #ffffff;
  --surface: #ffffff;
  --ink: #17181b;
  --muted: #565b64;
  --line: #8d9298;
  --hi: #ffffff;
  --lo: #8d9298;
  --accent: #c4371f;
  --shadow: rgba(20, 24, 32, 0.28);
  /* Silver plastic, as on the recorder; the same in both themes. */
  --btn: linear-gradient(180deg, #dcdfe2 0%, #c0c4c8 55%, #a9adb2 100%);
  --btn-edge: #f4f5f6 #686c72 #686c72 #f4f5f6;
  /* Glossy graphite ovals; red when pointed at. */
  --pill: radial-gradient(ellipse 75% 70% at 50% 72%, #555a62 0%, #2c2f35 52%, #121316 100%);
  --pill-hover: radial-gradient(ellipse 75% 70% at 50% 72%, #e8694d 0%, #c4371f 52%, #6e1a0c 100%);

  --font-body: "Times New Roman", Times, "Liberation Serif", "DejaVu Serif", serif;
  --font-head: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --font-narrow: "Arial Narrow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: Impact, "HelveticaNeue-CondensedBlack", "Arial Narrow", "Liberation Sans Narrow", "DejaVu Sans Condensed", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #141518;
    --surface: #1d1f23;
    --ink: #eef0f2;
    --muted: #a4aab3;
    --line: #50555d;
    --hi: #2a2d32;
    --lo: #000000;
    --accent: #ef6a4f;
    --shadow: rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-synthesis: style; }
body { margin: 0; color: var(--ink); background: var(--page); font: 17px/1.45 var(--font-body); }
[id] { scroll-margin-top: 16px; }
a { color: var(--accent); text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 5; background: var(--surface); padding: 8px 12px; }

.site { max-width: 920px; margin: 0 auto; padding: 44px 24px 36px; }

/* Front page: buttons on the left, wordmark and recorder on the right */
.front { display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); column-gap: 56px; align-items: start; }
.col-left { display: flex; flex-direction: column; gap: 22px; padding-top: 14px; }
.col-right { display: flex; flex-direction: column; align-items: center; }

.pills { display: flex; flex-direction: column; gap: 18px; }
.pills a {
  position: relative; display: flex; align-items: center; justify-content: center; height: 70px;
  border-radius: 50%; text-decoration: none; background: var(--pill);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, 0.45), inset 0 2px 3px rgba(255, 255, 255, 0.2), 0 6px 9px -3px var(--shadow);
}
.pills a::before {
  content: ""; position: absolute; left: 13%; right: 13%; top: 5%; height: 42%; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
}
.pills span {
  position: relative; font: 700 1.45rem/1 var(--font-display); letter-spacing: 0.02em; color: #fff;
  text-shadow: 1px 1px 0 #000, 2px 2px 3px rgba(0, 0, 0, 0.7);
}
.pills a:hover, .pills a:focus-visible, .pills a[aria-current] { background: var(--pill-hover); }
.pills a:focus-visible { border-radius: 50%; }
.pills a:active { transform: translateY(2px); box-shadow: inset 0 -3px 8px rgba(0, 0, 0, 0.5), 0 3px 5px -2px var(--shadow); }

.dots { height: 10px; margin: 2px 26px 0; background: radial-gradient(circle, transparent 0 2px, var(--line) 2.5px 3.6px, transparent 4.1px) center / calc(100% / 7) 10px repeat-x; }
/* App Store availability: words, not an imitation badge, until Cassie is live */
.store { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.store-soon { margin: 0; padding: 10px 14px 12px; max-width: 250px; text-align: center; font-size: 0.95rem; background: var(--surface); border: 2px solid var(--ink); }
.store-soon strong { display: block; margin-bottom: 4px; font: 700 0.95rem/1.3 var(--font-body); font-variant: small-caps; letter-spacing: 0.06em; color: var(--accent); }


/* Wordmark in a speech bubble */
.brand { position: relative; width: min(100%, 460px); aspect-ratio: 46 / 30; margin: 0; container-type: inline-size; }
.bubble { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bubble path { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.brand .wm-wrap { position: absolute; left: 0; right: 0; top: 13%; margin: 0; font-size: inherit; }
.wordmark { display: flex; flex-direction: column; align-items: center; gap: 2.4cqi; color: var(--ink); text-decoration: none; }
.wm-main { font: 700 19cqi/0.84 var(--font-display); letter-spacing: 0.01em; text-transform: uppercase; text-shadow: 3px 3px 0 var(--accent); }
.wm-sub { font: 700 5.6cqi/1 var(--font-body); font-variant: small-caps; letter-spacing: 0.04em; }

/* Caption under the recorder */
.recorder-note { margin: -6px 0 0; text-align: center; font-style: italic; }

/* Body */
.rule { height: 0; margin: 36px 0; border: 0; border-top: 2px solid var(--lo); border-bottom: 1px solid var(--hi); }
.story { max-width: 700px; }
.eyebrow { margin: 0 0 6px; font: 700 0.95rem/1.3 var(--font-body); font-variant: small-caps; letter-spacing: 0.06em; color: var(--accent); }
.story h2 { margin: 0 0 14px; font: 800 clamp(1.6rem, 3vw, 2.1rem)/1.12 var(--font-head); letter-spacing: -0.01em; text-wrap: balance; }
.lede { font-size: 1.1rem; margin-block: 0 14px; }
.how { margin-block: 0; }
kbd { font: 700 0.85em var(--font-mono); color: #17181b; background: var(--btn); border: 1px solid; border-color: var(--btn-edge); padding: 0 0.4em; }
.intro { margin: 0 0 20px; font-size: 1.1rem; }
.note { margin: 16px 0 0; font-size: 0.95rem; color: var(--muted); }

/* About: the specs as a bordered table */
.specs { margin: 0; background: var(--surface); border: 2px solid var(--ink); }
.specs > div { display: grid; grid-template-columns: 8.5rem 1fr; }
.specs > div + div { border-top: 1px solid var(--line); }
.specs dt { padding: 8px 12px; font: 700 0.95rem/1.45 var(--font-head); color: #8f2410; background: var(--btn); border-right: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.specs dd { margin: 0; padding: 8px 12px; min-width: 0; }
@media (max-width: 420px) {
  .specs > div { grid-template-columns: 1fr; }
  .specs dt { padding-block: 5px; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* Support and Privacy: standalone pages with every section open */
.page .col-left { position: sticky; top: 20px; }
.brand-sm { width: min(100%, 330px); }
.page-main { align-self: stretch; max-width: 700px; margin-top: 14px; }
.page-main h1 { margin: 0 0 6px; font: 800 clamp(1.9rem, 3.6vw, 2.5rem)/1.1 var(--font-head); letter-spacing: -0.015em; }
.page-main h2 { margin: 34px 0 10px; padding-top: 22px; border-top: 2px solid var(--lo); font: 800 1.45rem/1.2 var(--font-head); letter-spacing: -0.01em; text-wrap: balance; }
.page-main h3 { margin: 22px 0 6px; font: 700 1.08rem/1.3 var(--font-head); }
.page-main p, .page-main ul, .page-main ol { margin: 0 0 14px; }
.page-main ul, .page-main ol { padding-left: 24px; }
.page-main li + li { margin-top: 6px; }
.page-main a { overflow-wrap: anywhere; }
.effective { margin: 0 0 18px; font: 0.85rem var(--font-mono); color: var(--muted); }
.toc { margin: 0 0 8px; padding: 10px 16px 12px; background: var(--surface); border: 2px solid var(--ink); }
.toc h2 { margin: 0 0 6px; padding: 0; border: 0; font: 700 0.95rem/1.3 var(--font-body); font-variant: small-caps; letter-spacing: 0.06em; color: var(--accent); }
.toc ol { margin: 0; padding-left: 22px; columns: 2 15rem; column-gap: 28px; }
.toc li + li { margin-top: 2px; }
.placeholder { padding: 0 4px; font: 700 0.9em var(--font-mono); color: #17181b; background: #ffe14d; }

/* Recorder: a working model of a portable cassette recorder */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.recorder { width: 100%; overflow-x: hidden; overflow-x: clip; padding-block: 6px 30px; }
.deck { position: relative; width: min(100%, 350px); margin: 0 auto; container-type: inline-size; }
.deck-body {
  position: relative; z-index: 2;
  border-radius: 10px 10px 3px 3px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 -.28'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #c8cbcf 0%, #b9bdc1 45%, #aeb2b7 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.65), inset 2px 0 0 rgba(255, 255, 255, 0.25), inset -2px 0 0 rgba(0, 0, 0, 0.12), 0 30px 50px -18px var(--shadow);
}
.face { position: relative; }
.deck-face { display: block; width: 100%; height: auto; }
.deck-face text { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; fill: #2a2c2f; }
.deck-face .rc-brand { font: italic 700 31px Georgia, "Times New Roman", serif; }
.deck-face .rc-logo { font-size: 17px; font-weight: 700; }
.deck-face .rc-small { font-size: 15px; letter-spacing: 1.5px; }
.deck-face .rc-model { font-size: 25px; font-weight: 600; }
.deck-face .rc-tiny { font-size: 13px; letter-spacing: 0.6px; }
.deck-face .rc-scale { font-size: 14px; letter-spacing: 0.5px; }
.deck-face .rc-alc { font-size: 17px; letter-spacing: 1.2px; }
.deck-face .rc-mic { font-size: 17px; letter-spacing: 0.5px; }
.deck-face .rc-label { font-size: 17px; letter-spacing: 0.4px; }
.deck-face .rc-eject { font-size: 15px; letter-spacing: 0.4px; }
.deck-face .rc-digit { font-size: 27px; font-weight: 600; fill: #f0f0f0; }
#rc-led { fill: #4a1712; stroke: #1c1c1e; stroke-width: 2; }
#rc-led.on { fill: #ff3b22; filter: drop-shadow(0 0 5px rgba(255, 59, 34, 0.95)); }
#rc-door { transition: transform 0.3s cubic-bezier(0.2, 1.5, 0.4, 1); }
#rc-gap { opacity: 0; transition: opacity 0.2s; }
.door-open #rc-door { transform: translateY(-14px); }
.door-open #rc-gap { opacity: 1; }
#rc-reset { transition: transform 80ms; }
.reset-down #rc-reset { transform: translateY(3px); }
.counter-reset { position: absolute; left: 15.2%; top: 85.7%; width: 6%; height: 7%; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.keys-row { position: relative; font-size: 10px; font-size: 2.2cqw; padding-inline: 8%; }
.keys {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.3em; padding: 0.3em 0.3em 0;
  background: linear-gradient(180deg, #050506, #131314);
  --key-bg:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 0.5em) 0 100% / 100% 53% no-repeat,
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 0.5em) 0 100% / 100% 53% no-repeat,
    linear-gradient(180deg, #363638 0%, #232325 42%, #3b3b3d 45.5%, #151516 47%, #1a1a1b 100%);
}
.key {
  position: relative; display: block; width: 100%; aspect-ratio: 10 / 13; margin: 0; padding: 0; border: 0;
  border-radius: 0.3em 0.3em 0.2em 0.2em; cursor: pointer;
  -webkit-appearance: none; appearance: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  background: var(--key-bg);
  box-shadow: 0 1.3em 0 #0a0a0b, 0 1.6em 1.4em rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset -1px 0 0 rgba(0, 0, 0, 0.45);
  transition: transform 80ms ease-out, box-shadow 80ms ease-out, filter 80ms ease-out;
}
.key-record { background: linear-gradient(180deg, #d4553c, #a9361f) 0 0 / 100% 11% no-repeat, var(--key-bg); }
.key-pause {
  background:
    repeating-linear-gradient(180deg, #333335 0 0.36em, #121213 0.36em 0.52em) 0 0 / 100% 46% no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 0.34em) 0 100% / 100% 54% no-repeat,
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 0.34em) 0 100% / 100% 54% no-repeat,
    linear-gradient(180deg, #2a2a2c, #161617);
}
.key[aria-pressed="true"], .key.tap, .key:active {
  transform: translateY(1em);
  box-shadow: 0 0.3em 0 #0a0a0b, 0 0.5em 0.6em rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 0.5em 0.7em rgba(0, 0, 0, 0.35);
  filter: brightness(0.8);
}
.key:focus-visible, .counter-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.deck-base {
  position: relative; z-index: 1; font-size: 10px; font-size: 2.2cqw; height: 4.4em;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(180deg, #7f8388 0%, #b3b7bc 14%, #a8acb1 62%, #8d9196 64%, #e3e5e8 67%, #c4c7cb 100%);
  box-shadow: 0 2px 0 #8b9095, 0 18px 30px -12px var(--shadow);
}
.deck-face .rc-tape { font-size: 26px; font-weight: 700; letter-spacing: 6px; fill: #fff; }
.deck-face .rc-tape-sm { font-size: 17px; font-weight: 600; letter-spacing: 1px; fill: #fff; }
.deck-face .rc-side { font-size: 19px; font-weight: 700; fill: #c4371f; }

/* Footer: a text menu, the copyright, and the content-review date */
.site-footer { margin-top: 36px; }
.site-footer .rule { margin-top: 0; margin-bottom: 18px; }
.textnav { margin: 0 0 18px; }
.textnav .sep { margin-inline: 4px; color: var(--muted); }
.foot-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 32px; }
.foot-row p { margin: 0; }
.foot-row p + p { margin-top: 8px; }
.foot-row p.modified { margin-top: 22px; }
.modified { margin: 22px 0 0; font-style: italic; }
.modified time { white-space: nowrap; }

@media (max-width: 700px) {
  .site { padding: 24px 16px 28px; }
  /* One column: wordmark, buttons, recorder, then the rest */
  .front { display: flex; flex-direction: column; align-items: stretch; gap: 22px; }
  .col-left, .col-right { display: contents; }
  .brand { order: 1; align-self: center; width: min(100%, 400px); }
  .brand-sm { width: min(100%, 300px); }
  .page .col-left { position: static; }
  .page .dots { display: none; }
  .page-main { order: 3; margin-top: 0; }
  .pills { order: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pills a { height: 56px; }
  .pills a:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 6px); }
  .pills span { font-size: 1.15rem; }
  .recorder { order: 3; }
  .recorder-note { order: 4; margin-top: -12px; }
  .dots { order: 5; width: 100%; max-width: 260px; align-self: center; margin: 0; }
  .store { order: 6; }
  .rule { margin-block: 28px; }
  .foot-row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #rc-door, #rc-gap, .key { transition: none; }
}
