/* /together/ — two phones, one family plan (UX run-24, DESIGN.md § 8i). A v2 page on the css/toys.css tokens:
   putty surface, physical depth, springy keys, light and dark, Geist + Geist Mono like the other family pages.
   One lemon accent, the colour of a link being passed: the slab, the picked rows' boxes and the key that sends
   or keeps. Lemon is an object colour and stays the same in dark mode; text on it is ink (12.8:1). The rows
   sit on an ink «table» in both schemes on an off-white sheet with ink text, as on /sit-down/. */
body.tg {
  --t-display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --tg-gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --tg-ink: #141414;               /* text on lemon: 12.8:1; text on the sheet: 17:1 */
  --tg-ink-2: #5d5b55;             /* secondary text on the sheet: 6.3:1 */
  --tg-paper: #f7f6f2;             /* the sheet, in both schemes */
  --tg-paper-2: #e9e7e0;           /* wells on the sheet */
  --tg-line: rgba(20,20,20,.14);
  --tg-table: #141414;             /* the stage */
  padding-top: var(--header-h);
  font-family: var(--t-display);
  font-variation-settings: normal;
}
@media (prefers-color-scheme: dark) {
  body.tg { --tg-table: #0e0e0d; }
}
html:has(body.tg) { scroll-padding-top: calc(var(--header-h) + 18px); }
body.tg .t-wrap,
body.tg .container-wide { width: min(100% - 2 * var(--tg-gutter), 1240px); }
.tg-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Until together.js has drawn the slab, everything under the masthead is laid out but not painted. */
html.tg-wait #tg-slab,
html.tg-wait #tg-stage,
html.tg-wait .tg-how,
html.tg-wait .tg-keep,
html.tg-wait .tg-real,
html.tg-wait .site-foot { visibility: hidden; animation: tg-show 0s 3s forwards; }
@keyframes tg-show { to { visibility: visible; } }
@media (scripting: none) { #tg-stage, #tg-slab { display: none; } }
.tg-noscript { margin: 0 0 32px; padding: 18px 20px; border-radius: var(--t-r-m); background: var(--t-card); box-shadow: inset 0 0 0 2px var(--t-line); }

/* ---------- Masthead and the slab ---------- */
.tg-main { padding-bottom: 40px; }
.tg-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 48px; padding-bottom: 28px; }
@media (min-width: 1000px) { .tg-top { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: end; padding-top: 28px; } }
.tg-mast { padding: 36px 0 24px; }
@media (min-width: 1000px) { .tg-mast { padding: 28px 0 8px; } }
.tg-kicker { margin: 0 0 14px; color: var(--t-ink-2); }
.tg-mast h1 {
  margin: 0; max-width: 11ch;
  font-size: 2.5rem; line-height: .94; font-weight: 800; letter-spacing: -.02em; text-wrap: balance;
  animation: tg-rise .7s var(--t-spring) both;
}
.tg-mast h1:focus { outline: none; }
.tg-lede { margin: 20px 0 0; max-width: 48ch; font-size: 1.125rem; line-height: 1.4; color: var(--t-ink-2); text-wrap: pretty; }
.tg-lede strong { color: var(--t-ink); font-weight: 600; }
@keyframes tg-rise { from { transform: translateY(28px) scale(.97); } }
@media (min-width: 380px) { .tg-mast h1 { font-size: 2.75rem; } }
@media (min-width: 600px) { .tg-mast h1 { font-size: 4.25rem; } .tg-lede { font-size: 1.3125rem; } }
@media (min-width: 1100px) { .tg-mast h1 { font-size: 5.25rem; } }

.tg-slab {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 22px 20px 22px; border-radius: 34px;
  background: var(--t-lemon); color: var(--tg-ink);
  box-shadow: inset 0 -10px 0 rgba(0,0,0,.12), 0 24px 44px -26px rgba(199,154,0,.9);
  animation: tg-slab .8s var(--t-spring) .08s both;
}
@keyframes tg-slab { from { transform: translateY(36px) scale(.97); } }
@media (min-width: 600px) { .tg-slab { padding: 28px 30px 28px; } }
/* Two phones and the link between them, in the slab's corner. Decoration only. */
.tg-phones { position: absolute; z-index: -1; top: 18px; right: 18px; display: flex; align-items: center; gap: 6px; }
.tg-phones i { display: block; width: 22px; height: 38px; border-radius: 6px; box-shadow: inset 0 0 0 2.5px var(--tg-ink); }
.tg-phones i:last-child { background: var(--tg-ink); }
.tg-phones b { display: block; width: 34px; height: 0; border-top: 3px dashed var(--tg-ink); animation: tg-dash 1.2s linear 3; }
@keyframes tg-dash { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@media (min-width: 600px) { .tg-phones { top: 26px; right: 28px; gap: 8px; } .tg-phones i { width: 26px; height: 46px; } .tg-phones b { width: 44px; } }
.tg-slab-k { margin: 0; max-width: calc(100% - 120px); font: 600 .8125rem/1.3 var(--t-mono); letter-spacing: .08em; text-transform: uppercase; }
.tg-slab-title {
  margin: 34px 0 8px;
  font-size: clamp(2rem, 8.6vw, 3.5rem); line-height: .95; font-weight: 800; letter-spacing: -.02em; text-wrap: balance;
  overflow-wrap: anywhere;
}
.tg-slab-sub { margin: 0; max-width: 40ch; font: 500 .9375rem/1.45 var(--t-mono); }
.tg-slab-sub b { font-weight: 600; }

/* ---------- Keys ---------- */
body.tg .tg-key {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 18px; border: 0; border-radius: var(--t-r-btn, 10px); cursor: pointer;
  background: var(--t-card); color: var(--t-ink); text-decoration: none; text-align: center;
  font: 600 .9375rem/1.2 var(--t-display);
  box-shadow: inset 0 0 0 1.5px var(--t-line), inset 0 -4px 0 rgba(0,0,0,.08);
  transition: transform var(--t-base) var(--t-spring);
}
body.tg .tg-key:active { transform: translateY(2px) scale(.97); }
body.tg .tg-key:disabled { cursor: default; opacity: .6; }
body.tg .tg-key[hidden] { display: none; }
body.tg .tg-key-ink { background: var(--t-ink); color: var(--t-surface); box-shadow: inset 0 -4px 0 rgba(255,255,255,.14); font-weight: 700; }
body.tg .tg-key-line { background: transparent; box-shadow: inset 0 0 0 2px var(--t-ink); }
/* On the sheet the colours are fixed: it is paper in both schemes. */
body.tg .tg-sheet .tg-key { background: #ecebe6; color: var(--tg-ink); box-shadow: inset 0 0 0 1.5px var(--tg-line), inset 0 -4px 0 rgba(0,0,0,.08); }
body.tg .tg-sheet .tg-key-ink { background: var(--tg-ink); color: var(--tg-paper); box-shadow: inset 0 -4px 0 rgba(255,255,255,.14); font-weight: 700; }
body.tg .tg-sheet .tg-key-lemon { background: var(--t-lemon); color: var(--tg-ink); box-shadow: inset 0 -5px 0 rgba(0,0,0,.14); font-weight: 800; }
body.tg .tg-sheet .tg-key-line { background: transparent; color: var(--tg-ink); box-shadow: inset 0 0 0 2px var(--tg-ink); }
body.tg .tg-sheet a:not(.tg-key) { color: var(--tg-ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
body.tg .tg-sheet :focus-visible { outline: 3px solid var(--tg-ink); outline-offset: 2px; }

/* ---------- The stage: one sheet on the table ---------- */
.tg-stage {
  padding: 14px; border-radius: 34px;
  background: var(--tg-table); color: #ecebe6;
  box-shadow: inset 0 -8px 0 rgba(255,255,255,.06), 0 28px 50px -30px rgba(0,0,0,.6);
  animation: tg-slab .8s var(--t-spring) .14s both;
}
@media (prefers-color-scheme: dark) { .tg-stage { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.1), inset 0 -8px 0 rgba(255,255,255,.04); } }
@media (min-width: 600px) { .tg-stage { padding: 20px; } }
@media (min-width: 900px) { .tg-stage { padding: 24px; } }
.tg-sheet {
  display: flex; flex-direction: column; min-width: 0; min-height: 360px;
  padding: 20px 18px 18px; border-radius: 24px;
  background: var(--tg-paper); color: var(--tg-ink);
  box-shadow: inset 0 -6px 0 rgba(0,0,0,.08);
}
@media (min-width: 600px) { .tg-sheet { padding: 28px 30px 24px; } }
.tg-sheet.is-in { animation: tg-sheet .45s var(--t-spring) both; }
@keyframes tg-sheet { from { transform: translateY(14px) scale(.985); } }
.tg-sheet-k { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font: 600 .75rem/1.3 var(--t-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tg-ink-2); }
.tg-sheet-k:empty { display: none; }
.tg-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; background: var(--tg-ink); color: var(--tg-paper); letter-spacing: .04em; }
.tg-sheet-title { margin: 0 0 8px; font-size: 1.875rem; line-height: 1; font-weight: 800; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere; }
.tg-sheet-title:focus { outline: none; }
@media (min-width: 600px) { .tg-sheet-title { font-size: 2.5rem; } }
.tg-body { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.tg-body > p, .tg-p { margin: 0 0 14px; max-width: 62ch; color: var(--tg-ink-2); }
.tg-p strong { color: var(--tg-ink); }

/* The send card: two names, three parts, three ways out. */
.tg-names { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 6px 0 18px; }
@media (min-width: 600px) { .tg-names { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; } }
.tg-field { display: grid; gap: 6px; font-size: .875rem; font-weight: 600; color: var(--tg-ink-2); }
/* `body.tg` outranks `body.v2 input { font: inherit }`; no field under 16 px, or iOS Safari zooms on focus. */
body.tg .tg-field input {
  min-height: 48px; min-width: 0; width: 100%; padding: 10px 14px; border: 0; border-radius: var(--t-r-s);
  background: #fff; color: var(--tg-ink); font: 500 1rem/1.3 var(--t-display);
  box-shadow: inset 0 0 0 1.5px rgba(20,20,20,.3);
}
body.tg .tg-field input::placeholder { color: var(--tg-ink-2); opacity: 1; }
body.tg .tg-field input:focus-visible { outline: 3px solid var(--tg-ink); outline-offset: 1px; }
.tg-h3 { margin: 6px 0 10px; font: 600 .75rem/1.3 var(--t-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tg-ink-2); }
.tg-parts { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
@media (min-width: 900px) { .tg-parts .tg-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* A row you can tick: a part to send, or a change to keep. The box is drawn; the input fills the row. */
.tg-tick { position: relative; display: flex; gap: 14px; align-items: flex-start; min-height: 56px; padding: 12px 14px; border-radius: 16px; background: #fff; color: var(--tg-ink); cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--tg-line); transition: background-color var(--t-base), box-shadow var(--t-base); }
.tg-tick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tg-box { position: relative; display: grid; place-items: center; flex: none; width: 28px; height: 28px; margin-top: 1px; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 2px var(--tg-ink); transition: transform var(--t-base) var(--t-spring), background-color var(--t-base); }
.tg-tick input:checked ~ .tg-box { background: var(--t-lemon); transform: scale(1.06); }
.tg-tick input:checked ~ .tg-box::after { content: ""; width: 12px; height: 7px; margin-top: -3px; border: solid var(--tg-ink); border-width: 0 0 3px 3px; transform: rotate(-45deg); }
.tg-tick input:focus-visible ~ .tg-box { outline: 3px solid var(--tg-ink); outline-offset: 3px; }
.tg-tick input:checked ~ .tg-tick-main .tg-tick-t { color: var(--tg-ink); }
.tg-tick.is-off { cursor: default; background: transparent; box-shadow: inset 0 0 0 1.5px var(--tg-line); }
.tg-tick.is-off .tg-box { box-shadow: inset 0 0 0 2px rgba(20,20,20,.35); }
.tg-tick.is-off input { cursor: default; }
.tg-tick-main { flex: 1 1 auto; min-width: 0; }
.tg-tick-k { display: block; margin: 0 0 2px; font: 600 .75rem/1.35 var(--t-mono); letter-spacing: .03em; color: var(--tg-ink-2); }
.tg-tick-t { display: block; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tg-tick-m { display: block; margin-top: 2px; font: 500 .8125rem/1.4 var(--t-mono); color: var(--tg-ink-2); overflow-wrap: anywhere; }
.tg-tick-was { display: block; margin-top: 6px; padding: 4px 10px; border-radius: 8px; background: var(--tg-paper-2); font-size: .875rem; line-height: 1.35; overflow-wrap: anywhere; }
.tg-tick-a { display: block; margin-top: 6px; font: 600 .8125rem/1.3 var(--t-mono); color: var(--tg-ink); }
.tg-tick.is-gone .tg-tick-t { text-decoration: line-through; text-decoration-thickness: 2px; }
.tg-tick a { position: relative; z-index: 1; }
.tg-tick-go { display: inline-flex; align-items: center; min-height: 44px; margin: 2px 0 -10px; font-weight: 600; }

/* The changes from a link: a group per part. */
.tg-group { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.tg-group legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; margin: 0 0 10px; padding: 0; font-size: 1.125rem; font-weight: 800; }
.tg-group legend small { font: 500 .8125rem/1.3 var(--t-mono); color: var(--tg-ink-2); }
.tg-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .tg-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tg-more { margin-top: 8px; }
.tg-quiet { display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 16px; padding: 14px 16px; border-radius: 16px; background: var(--tg-paper-2); }
.tg-quiet::before { content: ""; flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--t-lemon); box-shadow: inset 0 0 0 2px rgba(20,20,20,.35); }
.tg-quiet p { margin: 0; }
.tg-quiet strong { display: block; margin-bottom: 2px; }
.tg-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; padding-top: 16px; border-top: 1.5px solid var(--tg-line); }
.tg-foot .tg-key-lemon { margin-left: auto; }
@media (max-width: 599px) { .tg-foot .tg-key { flex: 1 1 auto; } }
.tg-keys { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 599px) { .tg-keys > .tg-key { flex: 1 1 auto; } }
.tg-fine { margin: 12px 0 0; font-size: .875rem; color: var(--tg-ink-2); max-width: 62ch; }
.tg-done-stamp { display: inline-flex; align-self: flex-start; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 12px; border-radius: 999px; background: var(--t-lemon); color: var(--tg-ink); font: 600 .8125rem/1.3 var(--t-mono); }
.tg-done-stamp::before { content: ""; width: 10px; height: 6px; margin-top: -3px; border: solid var(--tg-ink); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg); }
.tg-ways { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
@media (min-width: 700px) { .tg-ways { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tg-ways a.tg-key { width: 100%; justify-content: flex-start; text-align: left; }

/* The made-up example for a first visit: two phones side by side. */
.tg-demo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 4px 0 18px; }
@media (min-width: 900px) { .tg-demo { grid-template-columns: minmax(0, .8fr) auto minmax(0, 1.2fr); align-items: start; } }
.tg-phone { min-width: 0; padding: 14px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 2px var(--tg-ink); }
.tg-phone-k { margin: 0 0 10px; font: 600 .75rem/1.3 var(--t-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--tg-ink-2); }
.tg-phone ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tg-phone li { min-width: 0; font-size: .9375rem; line-height: 1.3; overflow-wrap: anywhere; }
.tg-phone li small { display: block; font: 500 .75rem/1.4 var(--t-mono); color: var(--tg-ink-2); }
.tg-wire { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font: 600 .8125rem/1.3 var(--t-mono); color: var(--tg-ink); }
.tg-wire span { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: var(--t-lemon); box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
@media (min-width: 900px) { .tg-wire { flex-direction: column; padding-top: 48px; } }
.tg-demo .tg-rows { grid-template-columns: minmax(0, 1fr); }
.tg-demo .tg-rows > li { animation: tg-in .5s var(--t-spring) both; animation-delay: calc(var(--i, 0) * 160ms + 300ms); }
@keyframes tg-in { from { transform: translateY(10px); } }

/* ---------- Below the stage ---------- */
.tg-how { margin-top: 48px; }
.tg-h2 { margin: 0 0 8px; font-size: 1.75rem; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
@media (min-width: 900px) { .tg-h2 { font-size: 2.25rem; } }
.tg-how-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
@media (min-width: 900px) { .tg-how-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tg-how-list li { display: flex; gap: 14px; padding: 18px; border-radius: var(--t-r-l); background: var(--t-card); box-shadow: inset 0 0 0 1.5px var(--t-line); }
.tg-how-n { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--t-lemon); color: var(--tg-ink); font: 600 .9375rem/1 var(--t-mono); }
.tg-how-list h3 { margin: 4px 0 6px; font-size: 1.125rem; line-height: 1.2; font-weight: 800; }
.tg-how-list p { margin: 0; color: var(--t-ink-2); }
.tg-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 44px; padding-top: 18px; border-top: 1.5px solid var(--t-line); }
.tg-note { flex: 1 1 22em; margin: 0; font-size: .9375rem; color: var(--t-ink-2); }
body.tg .tg-keep :focus-visible, body.tg .tg-real :focus-visible { outline: 3px solid var(--t-ink); outline-offset: 2px; }

/* The answer to every action: a toast fixed at the bottom (as on /days-off/ and /sit-down/). */
.tg-status {
  position: fixed; z-index: 10000; left: 0; right: 0;
  bottom: calc(16px + var(--tg-toast-lift, 0px) + env(safe-area-inset-bottom, 0px));
  width: min(100% - 2 * var(--tg-gutter), 560px); margin: 0 auto; pointer-events: none;
}
.tg-toast {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px;
  padding: 8px 8px 8px 18px; border-radius: var(--t-r-m);
  background: var(--t-ink); color: var(--t-surface); pointer-events: auto;
  box-shadow: inset 0 -4px 0 rgba(255,255,255,.12), 0 22px 44px -16px rgba(0,0,0,.55);
  animation: tg-toast-in var(--t-base) var(--t-spring);
}
@keyframes tg-toast-in { from { transform: translateY(18px) scale(.97); } }
.tg-toast-keys { display: flex; flex: none; gap: 6px; margin-left: auto; }
.tg-toast-t { flex: 1 1 12em; min-width: 0; padding: 6px 0; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
body.tg .tg-toast-a, body.tg .tg-toast-x {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px;
  border: 0; border-radius: var(--t-r-btn, 10px); cursor: pointer; text-decoration: none;
  font: 700 .875rem/1.2 var(--t-display);
}
body.tg .tg-toast-a { background: var(--t-surface); color: var(--t-ink); box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }
body.tg .tg-toast-x { background: transparent; color: var(--t-surface); font-weight: 600; box-shadow: inset 0 0 0 1.5px currentColor; }
body.tg .tg-toast :focus-visible { outline: 3px solid var(--t-lemon); outline-offset: 2px; }
body.tg .tg-toast-a:active, body.tg .tg-toast-x:active { transform: translateY(2px) scale(.97); }

.tg-real { margin-top: 48px; padding: 26px 22px; border-radius: var(--t-r-l); background: var(--t-surface-2); }
.tg-real .t-label { margin: 0 0 10px; color: var(--t-ink-2); }
.tg-real h2 { margin: 0 0 10px; max-width: 24ch; font-size: 1.75rem; line-height: 1.05; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.tg-real p { margin: 0 0 16px; max-width: 62ch; color: var(--t-ink-2); }
@media (min-width: 900px) { .tg-real { padding: 36px 40px; } .tg-real h2 { font-size: 2.25rem; } }

@media (prefers-reduced-motion: reduce) {
  .tg-mast h1, .tg-slab, .tg-phones b, .tg-stage, .tg-sheet.is-in, .tg-toast, .tg-demo .tg-rows > li { animation: none !important; }
  .tg-box, .tg-tick, body.tg .tg-key { transition: none; }
  body.tg .tg-key:active, body.tg .tg-toast-a:active, body.tg .tg-toast-x:active { transform: none; }
  .tg-tick input:checked ~ .tg-box { transform: none; }
}
