/* Tikrar — the Bevel skin (T-240 / queue 10a).
 * Loaded after styles.css so it wins on equal specificity. Nothing here changes a
 * class name, a route or a behaviour: tokens, surfaces and the bar only.
 * Palette: canvas #0A0C0B · surface #131716 · raised #1B211E · line #242B28
 *          text #F2F5F3 · muted #8D9A94 · lime #C9F45A · mint #5BE0B0
 *          amber #FFB347 · coral #FF6B57
 */

:root {
  --ink: #F2F5F3;            /* text on the canvas */
  --teal: #C9F45A;           /* the one accent: primary action, active state */
  --teal-dark: #5BE0B0;      /* links and the quieter accent, readable on dark */
  --mist: #0A0C0B;           /* the canvas */
  --line: #242B28;
  --muted: #8D9A94;
  --amber: #FFB347;
  --coral: #FF6B57;

  --card: #131716;
  --raised: #1B211E;
  --appbar: #0F1413;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, .6);
}

body { background: var(--mist); color: var(--ink); }

/* ── App bar: a surface of its own, not the text colour ───────────────── */
.appbar {
  background: var(--appbar);
  color: var(--ink);
  box-shadow: none;
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--ink); }
.brand__name { letter-spacing: .16em; text-transform: uppercase; font-size: 1rem; }
.brand__ver { color: #6E7A74; }
.usermenu__btn { background: rgba(255, 255, 255, .06); color: var(--ink); }
.usermenu__btn:hover { background: rgba(255, 255, 255, .1); }

/* ── Chips ────────────────────────────────────────────────────────────── */
.chip--offpeak { background: rgba(201, 244, 90, .14); color: var(--teal); }
.chip--peak { background: rgba(255, 179, 71, .16); color: var(--amber); }
.chip--done { background: rgba(91, 224, 176, .14); color: var(--teal-dark); }
.chip--due { background: rgba(255, 107, 87, .16); color: var(--coral); }
.chip--muted { background: rgba(141, 154, 148, .16); color: var(--muted); }
.chip--level { background: rgba(201, 244, 90, .14); color: var(--teal); }

/* ── Surfaces ─────────────────────────────────────────────────────────── */
.card, .sheet, .modal, .list__item, .concept, .deckcard {
  background: var(--card);
  border-color: var(--line);
}

.btn { background: #171D1A; border-color: var(--line); color: var(--ink); }
.btn:hover { background: var(--raised); }
.btn--primary { background: var(--teal); border-color: var(--teal); color: #0A0C0B; }
.btn--primary:hover { background: #B7E24A; color: #0A0C0B; }
.btn--quiet { background: transparent; color: var(--muted); }
.btn--quiet:hover { background: var(--raised); color: var(--ink); }
.btn--danger { color: var(--coral); border-color: rgba(255, 107, 87, .45); }
.btn--danger:hover { background: rgba(255, 107, 87, .1); }

.input, .textarea, .select {
  background: #0F1413;
  border-color: #2A332F;
  color: var(--ink);
}
.input::placeholder, .textarea::placeholder { color: #5F6A65; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(201, 244, 90, .18);
}
.field__label { color: var(--ink); }

a { color: var(--teal-dark); }
:focus-visible { outline: 3px solid var(--teal); }

/* ── Ratings keep their rails, on the dark surface ────────────────────── */
.rate { background: var(--card); border-color: var(--line); color: var(--ink); }
.rate:hover { background: var(--raised); border-color: #2C3531; }
.rate--again { border-inline-start: 4px solid var(--coral); }
.rate--hard { border-inline-start: 4px solid var(--amber); }
.rate--good { border-inline-start: 4px solid var(--teal); }
.rate--easy { border-inline-start: 4px solid var(--teal-dark); }
.rate.is-chosen { background: var(--raised); }

/* ── The bar: a capsule, and the round button beside it ───────────────── */
.tabbar {
  background: rgba(22, 28, 25, .94);
  border: 1px solid #2C3531;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .5);
  backdrop-filter: blur(10px);
}
.tabbar__item { color: #7E8C86; }
.tabbar__item.is-active { color: var(--teal); }
.tabbar__fab {
  background: var(--teal);
  color: #0A0C0B;
  box-shadow: 0 8px 20px rgba(201, 244, 90, .22);
}
.tabbar__fab:hover { background: #B7E24A; }

/* ── Toasts and empty states ──────────────────────────────────────────── */
.toast { background: var(--raised); color: var(--ink); border: 1px solid var(--line); }
.toast--error { background: #3A1F1A; color: #FFD7CF; border-color: #5A2E26; }
.toast--ok { background: #16301F; color: #CFF3DC; border-color: #23482F; }
.empty { color: var(--muted); }
.empty h2 { color: var(--ink); }

/* ── Scrims and sheets ────────────────────────────────────────────────── */
.modal__scrim, .waiting { background: rgba(4, 6, 5, .62); backdrop-filter: blur(4px); }
.sheet { box-shadow: var(--shadow-lg); }
hr, .divider { border-color: var(--line); }

/* ── The rules that used --ink as a SURFACE and --card as TEXT on it ─────
   In the old palette ink was the dark block and card was the white text on it.
   Now ink is text and card is a surface, so those seven blocks and six labels
   are named here instead of following the tokens. */
.appbar,
.home__bar,
.home__hero,
.me__head { background: #0F1413; }

.home__bar,
.home__brand,
.home__stat,
.home__who,
.home__greet,
.home__ring svg text { fill: #F2F5F3; }
.home__who { background: rgba(255, 255, 255, .08); }
.home__who:hover { background: rgba(255, 255, 255, .12); }
.home__ring svg circle { stroke: #232B27; }
.home__ring svg circle + circle { stroke: var(--teal); }
.home__ring--new svg circle + circle { stroke: var(--amber); }
.home__ring svg text:nth-of-type(2) { fill: #8D9A94; }
.home__ring-lbl { color: #8D9A94; }
.home__freeze { background: #141917; }
.home__bar-fill { background: #232B27; }
.home__bar-fill.is-on { background: var(--teal); }
.home__freeze-lbl { color: #8D9A94; }

.toast { background: #1B211E; }
.ed-bar { background: #171D1A; }
.ihour__tip { background: #1B211E; color: #F2F5F3; }

/* the account disc: lime with dark ink, never white on lime */
.me__avatar { color: #0A0C0B; }
.me__id { color: #F2F5F3; }
.me__name { color: #F2F5F3; }

/* the home sheet sits on the canvas and its deck pills on the card surface */
.home__sheet { background: var(--mist); }
.home__decks .deck { background: var(--card); box-shadow: none; border: 1px solid var(--line); }

/* ── The heatmap reads as a gradient of lime on the canvas ─────────────── */
.heat { background: #1B211E; }
.heat--empty { background: transparent; }
.heat--0 { background: #1B211E; }
.heat--1 { background: rgba(201, 244, 90, .20); }
.heat--2 { background: rgba(201, 244, 90, .42); }
.heat--3 { background: rgba(201, 244, 90, .68); }
.heat--4 { background: var(--teal); }
.heatmap__rowlbl, .heatmap__wd { color: #6E7A74; }

/* ── Home, patch 2 (T-241 / D-T22): the face in the bar, three boxes, one button, 14 bars ── */
.home__avatar {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: #1B211E; border: 1px solid #2C3531;
  color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.home__avatar:hover { text-decoration: none; background: #232B27; }

.home__boxes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.home__box {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 2px; min-height: 92px; padding: 10px 6px 9px;
  background: #131716; border: 1px solid #242B28; border-radius: 14px;
}
.home__box-ic { height: 44px; display: flex; align-items: center; justify-content: center; }
.home__box-ic svg { fill: var(--teal); }
.home__box--sig .home__box-ic { align-items: flex-end; }
.home__sig { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 44px; }
.home__sig-bar { width: 5px; border-radius: 2px; background: #26302B; display: block; }
.home__sig-bar:nth-child(1) { height: 14px; }
.home__sig-bar:nth-child(2) { height: 22px; }
.home__sig-bar:nth-child(3) { height: 30px; }
.home__sig-bar:nth-child(4) { height: 38px; }
.home__sig-bar:nth-child(5) { height: 44px; }
.home__sig-bar.is-on { background: var(--teal); }
.home__box-num { font-size: 20px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15;
  color: var(--ink); font-variant-numeric: tabular-nums; }
.home__box-lbl { font-size: 9.5px; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; white-space: nowrap; }

.home__cta {
  width: 100%; height: 54px; margin-top: 16px; border: 0; border-radius: 999px;
  background: var(--teal); color: #0A0C0B; font: inherit; font-size: 16px; font-weight: 700;
  letter-spacing: -.01em; cursor: pointer;
}
.home__cta:active { transform: translateY(1px); }
.home__cta:hover { background: #B7E24A; }

.home__sect { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 2px; }
.home__sect h2 { margin: 0; font-size: 1.05rem; }
.home__avg { font-size: 11.5px; color: var(--muted); }
.home__chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px;
  align-items: end; height: 96px; margin-top: 10px; }
.home__bar-col { background: var(--teal); border-radius: 3px; display: block; min-height: 2px; }
.home__axis { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; margin-top: 5px; }
.home__axis span { font-size: 8.5px; color: #5F6A65; text-align: center; }

/* the home bar: brand left, the report word where the app puts it, the face hard right */
body.is-home .home__bar { display: flex; align-items: center; gap: 10px; }
body.is-home .home__bar .home__brand { margin-inline-end: auto; color: #F2F5F3; font-weight: 700; letter-spacing: .02em; }
body.is-home .home__bar .home__avatar { order: 99; color: var(--muted); }

/* wider screens: the boxes keep the phone's proportions instead of stretching, and the
   fortnight gets the height the extra width buys */
@media (min-width: 600px) {
  .home__boxes { max-width: 420px; margin-inline: auto; }
  .home__chart { height: 150px; }
  .home__cta { max-width: 420px; margin-inline: auto; display: block; }
  .home__sect, .home__chart, .home__axis { max-width: 620px; margin-inline: auto; }
}

/* ── Deck screen, patch 3a (T-242 / D-T23): parents in the light shade, children dark ── */
.concept-groups { display: flex; flex-direction: column; gap: 8px; }
.concept-groups .cg--parent {
  background: rgba(201, 244, 90, .09);
  border: 1px solid rgba(201, 244, 90, .18);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}
.concept-groups .cg--child { background: transparent; border: 0; margin: 0; padding: 0; }
.concept-groups .cg__head {
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 14px;
  font-size: 14.5px; font-weight: 600; color: var(--ink);
  cursor: pointer;
}
.concept-groups .cg__head::-webkit-details-marker { display: none; }
.concept-groups .cg__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.concept-groups .cg__head::after {
  content: ""; width: 8px; height: 8px; flex: 0 0 auto;
  border-right: 2px solid #7E8C86; border-bottom: 2px solid #7E8C86;
  transform: rotate(45deg); transition: transform .15s ease;
}
.concept-groups .cg[open] > .cg__head::after { transform: rotate(-135deg); }
/* the children live inside a darker block, recessed in the parent's light tile */
.concept-groups .cg--parent > .cg__body {
  background: #0C100E;
  border: 1px solid #1A211D;
  border-radius: 12px;
  margin: 0 8px 10px;
  padding: 2px 12px;
}
.concept-groups .cg--child .cg__head { padding: 10px 2px 8px; font-size: 13px; color: #C9D3CE; }
.concept-groups .concept { border-top: 1px solid #171E1A; }
.concept-groups .concept:first-child { border-top: 0; }
.concept-groups .concept__title { font-size: 13.5px; font-weight: 600; color: #E7EDE9; }
.concept-groups .concept__text { font-size: 11.5px; }
.concept-groups .concept__stats { font-size: 10.5px; color: #7E8C86; }
.concept-groups .cg__edit { background: none; border: 0; color: #7E8C86; font-size: 13px; padding: 4px 6px; }

/* ── Home, matched to the approved mock (T-241b): the sizes and words as drawn ── */
body.is-home .home__bar { padding-top: calc(14px + env(safe-area-inset-top)); }
body.is-home .home__brand {
  font-size: 15px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #F2F5F3;
}
.home__avatar { width: 34px; height: 34px; background: #1B1B1B; border: 1px solid #2A2A2A; color: #B9C3BE; }

.home__rings { gap: 26px; margin: 22px 0 0; }
.home__ring { width: 140px; gap: 10px; }
.home__ring svg { width: 140px; height: 140px; }
.home__ring svg circle { stroke-width: 11; }
.home__ring-lbl { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #8D9A94; font-weight: 700; }
.home__ring svg text:nth-of-type(2) { font-size: 9px; letter-spacing: .12em; }

.home__boxes { gap: 11px; margin-top: 22px; }
.home__box { min-height: 106px; padding: 12px 6px 11px; border-radius: 16px;
  background: #121514; border: 1px solid #222927; }
.home__box-ic { height: 46px; }
.home__box-num { font-size: 22px; }
.home__box-lbl { font-size: 9px; letter-spacing: .13em; color: #A6B0AB; }

.home__cta { height: 62px; font-size: 17px; font-weight: 700; margin-top: 20px; border-radius: 999px; }

.home__sect { margin: 24px 0 0; }
.home__sect h2 { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #8D9A94; font-weight: 700; }
.home__avg { font-size: 11.5px; color: #A6B0AB; }
.home__chart { height: 130px; gap: 6px; margin-top: 12px; }
.home__bar-col { border-radius: 4px; }
.home__axis { gap: 6px; margin-top: 7px; }
.home__axis span { font-size: 9px; color: #6E7A74; }

/* the deck rows under the chart: hairlines, a bigger name, the count in its ring */
.home__decks { margin-top: 18px; gap: 0; }
.home__decks .deck { height: 74px; border-radius: 0; background: transparent; border: 1px solid transparent;
  border-top: 1px solid #222927; padding: 0; box-shadow: none; }
.home__decks .deck:first-child { border-top: 0; }
.home__decks .deck__name { font-size: 16px; font-weight: 700; }
.home__decks .deck__meta { font-size: 12px; color: #8D9A94; }
.home__decks .deck__due svg circle { stroke-width: 3; }
.home__decks .deck__due-n { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.home__decks .deck__go { color: #6E7A74; }

.home__sect--decks { margin-top: 26px; }
.home__sheet { padding-bottom: calc(var(--tabbar-h) + 26px); }
.home__decks { padding-bottom: 6px; }

/* fit the whole home on one phone screen, as the mock does */
.home__bars, .home__rings { margin-top: 14px; }
.home__rings { margin: 14px 0 0; }
.home__ring { width: 128px; }
.home__ring svg { width: 128px; height: 128px; }
.home__boxes { margin-top: 16px; }
.home__box { min-height: 100px; padding: 10px 6px 9px; }
.home__cta { margin-top: 16px; height: 58px; }
.home__sect { margin: 18px 0 0; }
.home__chart { height: 112px; margin-top: 10px; }
.home__axis { margin-top: 5px; }
.home__sect--decks { margin-top: 18px; }
.home__decks { margin-top: 10px; }
.home__decks .deck { height: 68px; }
.home__sheet { padding-top: 8px; }

.home__decks .deck__due-n { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.home__decks .deck__pill {
  min-width: 26px; height: 26px; padding: 0 7px; margin-inline-start: 10px;
  border-radius: 999px; background: var(--teal); color: #0A0C0B;
  font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.home__decks .deck__pill:empty { display: none; }

/* ── Matched to the picture, pixel for pixel (T-241c) ─────────────────────
   Neutral ground, the rings at their drawn size, the boxes at 120, the button at 58,
   the fortnight at 132, a badge on every deck row, and the play's glow. */
:root {
  --mist: #0A0A0A;
  --card: #141414;
  --raised: #1C1C1C;
  --line: #232323;
  --muted: #8A8A8A;
  --ink: #F4F4F4;
}
body { background: #0A0A0A; }
.home { background: #0A0A0A; }
.home__hero { background: #0A0A0A; border-radius: 0; padding-bottom: 26px; }

.home__ring { width: 152px; }
.home__ring svg { width: 152px; height: 152px; }
.home__ring svg circle { stroke: #2A2A2A; stroke-width: 12; }
.home__ring svg circle + circle { stroke: var(--teal); }
.home__ring--new svg circle + circle { stroke: var(--teal-dark); }
.home__ring-lbl { font-size: 10px; letter-spacing: .22em; color: #9A9A9A; }

.home__boxes { gap: 10px; }
.home__box { min-height: 120px; padding: 12px 6px 10px; background: #141414; border: 1px solid #242424; border-radius: 18px; }
.home__box-ic { height: 50px; }
.home__box-ic svg { fill: var(--teal); width: 30px; height: 30px; }
.home__box--sig .home__box-ic svg, .home__sig { height: 50px; }
.home__sig-bar { width: 6px; }
.home__sig-bar:nth-child(1) { height: 16px; }
.home__sig-bar:nth-child(2) { height: 26px; }
.home__sig-bar:nth-child(3) { height: 36px; }
.home__sig-bar:nth-child(4) { height: 44px; }
.home__sig-bar:nth-child(5) { height: 50px; }
.home__sig-bar.is-on { background: var(--teal); }
.home__box-num { font-size: 24px; }
.home__box-lbl { font-size: 9.5px; letter-spacing: .16em; color: #9A9A9A; }

.home__cta { height: 58px; font-size: 18px; margin-top: 18px; }

.home__sect h2 { font-size: 11px; letter-spacing: .2em; color: #9A9A9A; }
.home__avg { font-size: 12px; color: #C9C9C9; }
.home__chart { height: 132px; gap: 7px; }
.home__axis span:nth-child(even) { visibility: hidden; }
.home__axis span { font-size: 9.5px; color: #8A8A8A; }

.home__decks .deck { height: 73px; border-top: 1px solid #232323; }
.home__decks .deck__due svg { width: 30px; height: 30px; }
.home__decks .deck__name { font-size: 17px; }
.home__decks .deck__meta { font-size: 12.5px; color: #8A8A8A; }
.home__decks .deck__pill { min-width: 26px; height: 26px; font-size: 13px; background: #C6F24E; }

/* the play outside the bar, with its glow; forward when nothing is due */
.tabbar__fab { background: #C6F24E; box-shadow: 0 0 22px rgba(198, 242, 78, .45); }
.tabbar__fab::-moz-focus-inner { border: 0; }

.tabbar__fab svg { stroke: currentColor; }
.tabbar__fab svg path[fill="currentColor"] { stroke: none; }

/* the drawn proportions still have to fit one screen: the fortnight is the tallest block */
.home__ring { width: 140px; } .home__ring svg { width: 140px; height: 140px; }
.home__box { min-height: 104px; } .home__box-ic { height: 44px; } .home__sig { height: 44px; }
.home__chart { height: 108px; }
.home__cta { height: 56px; margin-top: 16px; }
.home__boxes { margin-top: 14px; }
.home__sect { margin: 16px 0 0; }
.home__sheet { padding-bottom: calc(var(--tabbar-h) + 10px); }
/* the bars read bright like the picture, the short days only slightly softer */
.home__bar-col { opacity: 1 !important; }

/* one screen, as the picture is one screen */
.home__ring { width: 132px; } .home__ring svg { width: 132px; height: 132px; }
.home__boxes { margin-top: 12px; }
.home__box { min-height: 94px; padding: 8px 6px 8px; }
.home__box-ic { height: 40px; } .home__sig { height: 40px; }
.home__sig-bar:nth-child(1){height:13px}.home__sig-bar:nth-child(2){height:21px}.home__sig-bar:nth-child(3){height:29px}
.home__sig-bar:nth-child(4){height:35px}.home__sig-bar:nth-child(5){height:40px}
.home__cta { height: 54px; margin-top: 14px; }
.home__sect { margin: 14px 0 0; }
.home__chart { height: 96px; margin-top: 8px; }
.home__axis { margin-top: 4px; }
.home__sect--decks { margin-top: 14px; }
.home__decks { margin-top: 6px; }
.home__decks .deck { height: 64px; }
.home__hero { padding-bottom: 18px; }
.home__grip { margin-bottom: 2px; }

/* the play beside the capsule, level with it — as the picture draws it */
.tabbar { margin-inline-end: 96px; }
.tabbar__gap { display: none; }
.tabbar__fab {
  left: auto; right: -80px; bottom: 0; transform: none;
  width: 56px; height: 56px;
  box-shadow: 0 0 22px rgba(198, 242, 78, .45);
}
.tabbar__fab svg { width: 24px; height: 24px; }

/* ── T-287 — the two marks that earn the return: the chain and the freeze bank ─────────────
 * On only when they carry a number. A slow halo, no bounce, and nothing at all when the
 * reader asked the system for less motion. */
@keyframes tkr-halo { 0%, 100% { opacity: .16; transform: scale(1); } 50% { opacity: .46; transform: scale(1.14); } }
.d2 .m .ic.is-live { position: relative; }
.d2 .m .ic.is-live::after {
  content: ""; position: absolute; inset: -7px; border-radius: 999px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(168, 224, 74, .55), rgba(168, 224, 74, 0));
  animation: tkr-halo 2.8s ease-in-out infinite;
}
.d2 .m .ic.is-live svg { filter: drop-shadow(0 0 5px rgba(168, 224, 74, .55)); }
.d2 .m .ic.is-live--mint::after {
  background: radial-gradient(closest-side, rgba(91, 224, 176, .5), rgba(91, 224, 176, 0));
}
.d2 .m .ic.is-live--mint svg { filter: drop-shadow(0 0 5px rgba(91, 224, 176, .5)); }
@media (prefers-reduced-motion: reduce) {
  .d2 .m .ic.is-live::after { animation: none; opacity: .34; }
}
