/* Ember brand system — the look of our custom firmware and its companion tools.
   A sunlit, friendly world: warm morning white, cocoa ink, soft lifted white cards,
   and ember orange for the things you press. The pucks themselves are the only dark
   objects on the page: black glass in a light metal rim, like a product shot.
   Rounded type (Nunito, the face the puck's own Faces firmware uses).
   Shared by index.html (config) and store.html (apps). */

:root {
  --bg: #FFFAF6;                    /* morning white, a breath of warmth */
  --card: #FFFFFF; --surface: #FFFFFF;
  --lift: #F7EEE8;                  /* inputs, quiet buttons: warm light fill */
  --w: #2E1F19;                     /* ink: cocoa, never black */
  --mute: #75625A; --faint: #A8968D;
  --line: rgba(46, 31, 25, 0.09);
  --accent: #FF6A3D;                /* ember, for fills and glows */
  --accent-ink: #C2410C;            /* ember deep enough to read as text on white */
  --hot: #FFB347; --err: #D92D4A;
  --shadow: 0 1px 2px rgba(74, 38, 20, 0.05), 0 10px 30px -14px rgba(74, 38, 20, 0.22);
  --shadow-up: 0 2px 4px rgba(74, 38, 20, 0.06), 0 18px 40px -16px rgba(74, 38, 20, 0.30);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sans: "Figtree", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Nunito", ui-rounded, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: light; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--w); -webkit-font-smoothing: antialiased; padding: 0 0 8px; min-height: 100vh;
  font: 500 16px/24px var(--sans); }
/* morning light: one soft apricot glow from the top, the brand's one atmospheric move */
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 560px; pointer-events: none; z-index: -1;
  background: radial-gradient(110% 100% at 50% -20%, #FFE1CF, rgba(255, 225, 207, 0.45) 45%, transparent 75%); }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

::selection { background: #FFD3BF; color: var(--w); }
:focus-visible { outline: 3px solid rgba(255, 106, 61, 0.55); outline-offset: 3px; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.wrap.wide { max-width: 1000px; }

header.site { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 640px; margin: 0 auto; padding: 28px 24px 0; }
header.site.wide { max-width: 1000px; }
.name { display: flex; align-items: baseline; gap: 9px; font-family: var(--display); font-size: 25px; font-weight: 900; letter-spacing: -0.02em; }
.name .logo { align-self: center; display: block; width: 30px; height: 30px; flex: none; filter: drop-shadow(0 3px 6px rgba(255, 106, 61, 0.35)); }
/* One nav on every page, same tabs in the same order; the current page is highlighted, never removed.
   A page's own action (store's Connect puck) sits at the far right, so it can't push the tabs around. */
nav.tabs { display: flex; gap: 2px; margin-right: auto; }
nav.tabs a { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 17px;
  font-size: 14px; font-weight: 700; white-space: nowrap; color: var(--mute); transition: color 0.16s, background 0.16s; }
nav.tabs a:hover { color: var(--w); }
nav.tabs a[aria-current="page"] { color: var(--w); background: #fff; box-shadow: 0 1px 2px rgba(74, 38, 20, 0.08), 0 4px 12px -6px rgba(74, 38, 20, 0.25); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 22px;
  border: 0; border-radius: 22px; cursor: pointer; color: #fff; font: inherit; font-size: 15px; font-weight: 800; white-space: nowrap;
  background: linear-gradient(180deg, #FF7A45, #E8501C);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 1px 2px rgba(196, 64, 18, 0.3), 0 10px 22px -10px rgba(232, 80, 28, 0.7);
  transition: filter 0.16s, transform 0.25s var(--spring), box-shadow 0.2s var(--ease); }
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:active { transform: scale(0.96); }
.btn.quiet { background: var(--lift); color: var(--w); font-weight: 700; box-shadow: none; }
.btn.quiet:hover { filter: none; background: #F0E3DA; }
.btn.small { height: 34px; padding: 0 15px; border-radius: 17px; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: none; transform: none; box-shadow: none; }
.btn.quiet:disabled { background: var(--lift); }
.btn svg { width: 13px; height: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }

.lede { font-family: var(--sans); font-size: 21px; line-height: 31px; font-weight: 500; letter-spacing: -0.01em; color: var(--mute); text-wrap: pretty; margin: 24px 0 26px; }
.lede b { color: var(--w); font-family: var(--display); font-weight: 900; letter-spacing: -0.015em; }
.muted { color: var(--mute); font-size: 13px; }
.hint { color: var(--faint); font-size: 13px; }

footer.site { max-width: 640px; margin: 56px auto 0; padding: 20px 24px 36px; display: flex; justify-content: space-between; gap: 16px;
  font-size: 13px; line-height: 20px; color: var(--faint); border-top: 1px solid var(--line); }
footer.site.wide { max-width: 1000px; }
footer.site a { color: var(--mute); transition: color 0.16s; }
footer.site a:hover { color: var(--w); }

@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(12px); animation: rise 0.8s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 70ms); }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
@media (max-width: 560px) {
  .wrap, header.site, footer.site { padding-left: 16px; padding-right: 16px; }
  header.site { flex-wrap: wrap; row-gap: 12px; }
  nav.tabs { order: 3; flex-basis: 100%; }   /* tabs drop to their own row */
  nav.tabs a { padding: 0 10px; }   /* five tabs fit 390px */
  footer.site { flex-direction: column; gap: 6px; }
}

/* A puck: an app screenshot in black glass inside a light metal rim, like a product shot.
   --s sets the size. .unlit is an app that isn't built yet. Used by store.html and about.html. */
.puck { --s: 76px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; background: #0B0908; flex: none;
  display: grid; place-items: center; color: #F6EFE8; overflow: hidden;
  box-shadow: 0 0 0 calc(var(--s) * 0.04) #EFE8E3, 0 0 0 calc(var(--s) * 0.04 + 1px) #D9CFC8,
    0 calc(var(--s) * 0.08) calc(var(--s) * 0.18) calc(var(--s) * -0.05) rgba(74, 38, 20, 0.38),
    0 calc(var(--s) * 0.2) calc(var(--s) * 0.3) calc(var(--s) * -0.18) rgba(74, 38, 20, 0.4); }
.puck::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;   /* glass glare */
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), transparent 38%); }
.puck svg { width: 40%; height: 40%; }
.puck img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.puck.unlit { background: radial-gradient(circle at 35% 30%, #FFFFFF, #F1E6DE 70%); color: #B5A197;
  box-shadow: 0 0 0 calc(var(--s) * 0.04) #F4EEEA, 0 0 0 calc(var(--s) * 0.04 + 1px) #E2D8D1, 0 6px 14px -8px rgba(74, 38, 20, 0.25); }
.puck.unlit::after { display: none; }

/* A sheet: the centred dialog used for app details (store) and the Connect explainer (both pages). */
dialog.sheet { width: min(540px, calc(100vw - 32px)); border: 0; border-radius: 30px; padding: 34px 32px 28px; background: #fff; color: var(--w);
  box-shadow: 0 30px 80px -20px rgba(74, 38, 20, 0.45); text-align: center; }
dialog.sheet::backdrop { background: rgba(46, 31, 25, 0.32); backdrop-filter: blur(6px); }
dialog.sheet .puck { margin: 4px auto 22px; }
dialog.sheet h2 { font-family: var(--display); font-weight: 900; font-size: 32px; letter-spacing: -0.025em; margin: 0; }
dialog.sheet .cat-tag { margin: 4px 0 14px; }
dialog.sheet .desc { font-size: 16px; line-height: 24px; color: var(--mute); margin: 0 auto 16px; max-width: 40ch; }
dialog.sheet .howto { text-align: left; font-size: 14px; line-height: 21px; padding: 12px 16px; }
dialog.sheet .acts { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 22px; flex-wrap: wrap; }
dialog.sheet .x { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--lift);
  color: var(--w); font-size: 20px; line-height: 1; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  dialog.sheet[open] { animation: pop 0.45s var(--spring); }
  @keyframes pop { from { opacity: 0; transform: translateY(18px) scale(0.96); } }
}
dialog.sheet.connect .needs { text-align: left; margin: 0 0 6px; padding: 0 0 0 22px; color: var(--mute); font-size: 14.5px; line-height: 21px; }
dialog.sheet.connect .needs li { margin: 0 0 10px; padding-left: 4px; }
dialog.sheet.connect .needs li::marker { color: var(--accent-ink); font-weight: 800; }
dialog.sheet.connect .needs b { color: var(--w); }
dialog.sheet.connect .needs li.miss { color: var(--err); }
dialog.sheet.connect .fine { color: var(--faint); font-size: 13px; margin: 4px 0 0; }

/* Empty state: a card that says what's missing and what to do. */
.blank { text-align: center; padding: 34px 26px; }
.blank .puck { margin: 0 auto 18px; }
.blank h2 { font-family: var(--display); font-weight: 900; font-size: 22px; letter-spacing: -0.02em; margin: 0 0 6px; }
.blank p { color: var(--mute); font-size: 15px; line-height: 23px; margin: 0 auto; max-width: 40ch; }
dialog.sheet.connect h2 { margin-bottom: 10px; }
