/* Envelope review uses the same paper, type and rule colors as the planner. */
.yt-dialog {
  --yt-edge: clamp(17px, 4vw, 32px);
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  width: min(580px, calc(100vw - 32px));
  max-width: none;
  max-height: min(860px, 90vh);
  max-height: min(860px, 90dvh);
  border: 1px solid var(--bd2);
  border-radius: 10px;
  background: var(--bg, #faf8f3);
  color: var(--ink);
  box-shadow: 0 20px 80px #27211538;
  font: 500 14px/1.45 var(--ui);
  overflow: hidden;
}
.yt-dialog[open] { display: flex; flex-direction: column; }
.yt-dialog::backdrop { background: #201d1859; }
.yt-dialog :is(button,select,summary):focus-visible { outline: 2px solid var(--navy); outline-offset: -2px; }
.yt-dialog button { cursor: pointer; }
.yt-dialog button:disabled { opacity: .55; cursor: default; }
.yt-dialog [hidden] { display: none; }
.yt-dialog > .dialog-close { position: absolute; top: 13px; right: 13px; height: 34px; width: 34px; z-index: 1; background: transparent; color: var(--ink2); }
.yt-head { padding: 22px var(--yt-edge) 18px; border-bottom: 1px solid var(--bd); flex: none; }
.yt-head h2 { margin: 0 34px 2px 0; font: 500 clamp(23px, 3vw, 29px)/1.2 var(--serif); letter-spacing: -.025em; }
.yt-head h2:focus { outline: none; }
.yt-summary { display:flex; flex-direction:column; align-items:flex-start; padding: 21px 0 16px; }
.yt-total { font: 500 clamp(34px, 6vw, 45px)/1.08 var(--serif); letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
.yt-caption { color:var(--ink2); margin-top:3px; }
.yt-zero { font:500 23px/1.3 var(--serif); }
.yt-summary-list { border-top:1px solid var(--bd2); }
.yt-link, .yt-name-options > summary { color:var(--navy); font:600 13px/1.4 var(--ui); background:none; border:0; padding:0; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.yt-link.yt-back { margin-bottom:9px; }

.yt-subtitle { margin:0; padding-right:36px; font:550 12px/1.35 var(--ui); color:var(--ink2); }
.yt-filter { display:block; width:100%; margin-top:12px; border:1px solid var(--bd2); border-radius:5px; padding:7px 10px; background:var(--bg); color:var(--ink); font:500 13px var(--ui); }
.yt-scroll { min-height: 70px; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--yt-edge) 6px; scrollbar-width: thin; }
.yt-pair-layout { display:grid; grid-template-columns:minmax(0, 2fr) minmax(0, 3fr); gap:18px; align-items:start; margin:18px 0; }
.yt-pair-label, .yt-pair-current { font-size:12px; color:var(--ink2); }
.yt-chooser { min-width:0; }
.yt-pair-instruction { margin:0 0 10px; font-size:13px; }
.yt-category-search { margin:0 0 8px; }
.yt-category-list { display:grid; align-content:start; gap:5px; max-height:clamp(145px,32vh,285px); overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.yt-envelope-option { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; min-height:44px; padding:8px 10px; border:1px solid var(--bd2); border-radius:5px; background:var(--s1); color:var(--ink); text-align:left; font:inherit; }
.yt-dialog .yt-envelope-option { cursor:pointer; }
.yt-envelope-option[aria-current] { border-color:#547861; background:#edf2ec; }
.yt-option-label { display:grid; min-width:0; overflow-wrap:anywhere; }
.yt-option-label strong { font-size:13px; }
.yt-option-label small, .yt-option-balance { font-size:12px; color:var(--ink2); }
.yt-option-balance { font-variant-numeric:tabular-nums; }
.yt-pair-alternatives { display:flex; flex-wrap:wrap; align-items:baseline; gap:8px 16px; border-top:1px solid var(--bd); padding:12px 0; }
.yt-name-options { flex-basis:100%; }
.yt-name-options button { display:block; margin-top:8px; }
.yt-empty { padding:12px 0; color:var(--ink2); }
.yt-actions { flex:none; padding:12px var(--yt-edge); display:flex; align-items:center; gap:12px; border-top:1px solid var(--bd2); background:var(--paper-mist); }
.yt-status { margin:0 auto 0 0; font-size:12px; color:var(--ink2); overflow-wrap:anywhere; }
.yt-primary, .yt-secondary { flex: none; padding: 9px 14px; border-radius: 5px; font: 650 13px/1.4 var(--ui); }
.yt-primary { background: #345541; color: #fff; border: 1px solid #345541; }
.yt-secondary { background: var(--s1); color:var(--ink); border: 1px solid var(--bd2); }
@media (hover:hover) {
  .yt-primary:hover:enabled { background: #2b4836; }
}
@media (max-width:600px) {
  .yt-dialog { width: calc(100vw - 12px); max-height:94vh; max-height:94dvh; --yt-edge:14px; }
  .yt-head { padding-top:16px; padding-bottom:12px; }

  .yt-pair-layout { grid-template-columns:minmax(0,1fr); gap:10px; margin:12px 0; }
  .yt-pair-alternatives { padding:4px 0; }
  .yt-pair-alternatives button, .yt-name-options summary { min-height:44px; }
  .yt-category-list { max-height:min(25dvh,230px); }
  .yt-filter { font-size:16px; }
  .yt-actions { padding:10px var(--yt-edge); gap:7px; flex-wrap:wrap; }
  .yt-status { flex:1 1 130px; }
  .yt-actions button, .yt-dialog > .dialog-close { min-height:44px; }
  .yt-dialog > .dialog-close { top:3px; right:3px; width:44px; }
}

/* The review reads as a transfer slip. Matching uses the same two columns. */
.yt-dialog {
  --yt-green:var(--green,var(--teal));
  --yt-quiet:var(--ink2);
  --yt-line:var(--bd2);
  --yt-cols:minmax(0,1fr) minmax(80px,auto) minmax(90px,auto);
  width:min(640px,calc(100vw - 24px)); border-color:var(--bd2); border-radius:var(--r-md);
  background:var(--bg); box-shadow:0 14px 44px #29231938;
}
.yt-head { position:relative; padding:12px var(--yt-edge); color:var(--ink); background:var(--paper-mist); border-bottom:1px solid var(--bd2); }
.yt-mail { display:inline-block; position:relative; overflow:hidden; width:17px; height:12px; flex:0 0 auto; border:1.4px solid currentColor; border-radius:2px; color:inherit; }
.yt-mail::before { content:""; position:absolute; left:15%; top:-64%; width:68%; height:109%; border-right:1.3px solid; border-bottom:1.3px solid; transform:rotate(45deg); }
.yt-head h2 { font:500 clamp(20px,2vw,23px)/1.16 var(--serif); color:var(--ink); margin-top:6px; }
.yt-dialog > .dialog-close { z-index:2; color:var(--ink2); top:4px; }
.yt-dialog .yt-back { display:block; margin:0; color:var(--ink2); font-size:11px; }
.yt-dialog .yt-back[hidden] { display:none; }
.yt-summary { padding:15px 0 12px; gap:2px; }
.yt-total { color:var(--yt-green); font:500 clamp(30px,3.5vw,36px)/1 var(--serif); letter-spacing:-.045em; }
.yt-caption,.yt-route-hint { color:var(--yt-quiet); font-size:12px; }
.yt-route, .yt-route-legend { display:grid; grid-template-columns:var(--yt-cols); align-items:center; gap:8px; }
.yt-summary-list { display:grid; grid-template-columns:var(--yt-cols); column-gap:8px; }
.yt-route, .yt-route-legend { grid-column:1 / -1; grid-template-columns:subgrid; }
.yt-route-hint { grid-column:1 / -1; }
.yt-route-legend { padding:8px 0 7px; border-bottom:1px solid var(--yt-line); color:var(--yt-quiet); font:600 10px/1.3 var(--ui); letter-spacing:.05em; text-transform:uppercase; }
.yt-route-legend span:nth-child(2) { text-align:right; }
.yt-route-legend span:last-child { text-align:right; }
.yt-route { padding:3px 0; border-bottom:1px solid var(--bd); }
.yt-route button { margin:0; font:inherit; min-width:0; }
.yt-route .yt-route-source { display:flex; align-items:center; text-align:left; gap:8px; min-height:42px; border-radius:5px; padding:6px 8px; overflow-wrap:anywhere; }
.yt-route .yt-route-source { cursor:pointer; color:var(--ink); }
.yt-route-source strong { font-size:14px; font-weight:650; }
.yt-item-choice { display:flex; align-items:center; min-width:0; gap:3px; }
.yt-choice-action { text-decoration:underline; text-underline-offset:2px; color:var(--yt-green); }
.yt-route .yt-route-amount { justify-self:end; padding:0; border:0; background:none; color:var(--yt-green); font-weight:650; font-variant-numeric:tabular-nums; }
.yt-route-hint { display:block; margin:9px 0 4px; }
.yt-dest-title { margin:0 0 7px; font:650 13px var(--ui); color:var(--yt-green); }
.yt-pair-layout { grid-template-columns:minmax(0, .8fr) minmax(0,1.2fr); gap:16px; margin:15px 0; }
.yt-source-money { font-variant-numeric:tabular-nums; font-size:13px; }
.yt-pair-current { border-top:1px solid #d0d8c8; margin-top:7px; padding-top:9px; }
.yt-pair-label { font-size:10px; font-weight:650; letter-spacing:.07em; text-transform:uppercase; }
.yt-envelope-option { background:var(--bg); border-color:var(--bd2); }
.yt-envelope-option .yt-mail { color:#64836d; }
.yt-option-label { flex:1; }
.yt-pair-instruction { color:var(--yt-quiet); font-size:12px; }
.yt-actions { background:var(--paper-mist); border-top:1px solid var(--yt-line); }
.yt-status { font-size:11px; }
.yt-primary { border-radius:6px; background:var(--yt-green); }
@media(max-width:600px) {
  .yt-dialog { --yt-cols:minmax(0,1fr) minmax(60px,auto) minmax(66px,auto); width:calc(100vw - 12px); }
  .yt-head { padding-top:10px; padding-bottom:10px; }
  .yt-summary { padding:15px 0 12px; }
  .yt-summary-list, .yt-route, .yt-route-legend { column-gap:10px; }
  .yt-route .yt-route-source { gap:4px; padding:4px; min-height:44px; }
  .yt-route-source strong,.yt-route .yt-route-amount { font-size:12px; }
  .yt-route-legend { font-size:9px; }
  .yt-pair-layout { grid-template-columns:minmax(0,1fr); gap:13px; margin:14px 0; }
}

.yt-route .yt-linked-row {
  display:grid; grid-template-columns:subgrid; grid-column:1 / -1; align-items:center;
  width:100%; min-height:42px; padding:0; border:0; border-radius:4px;
  background:transparent; text-align:left; color:var(--ink); overflow-wrap:anywhere;
}
.yt-linked-change { color:var(--yt-green); font-weight:600; text-align:right; font-variant-numeric:tabular-nums; }
@media (max-width:600px) {
  .yt-route .yt-linked-row { min-height:44px; font-size:12px; }
}

.yt-period-name { display:grid; gap:2px; min-width:0; text-align:left; }
.yt-period-name small { font:500 11px/1.35 var(--ui); color:var(--yt-quiet); }
.yt-route .yt-route-source { background:transparent; border-color:transparent; padding-left:0; }
.yt-route .yt-linked-row { padding-left:0; }
.yt-after { color:var(--ink); text-align:right; font-variant-numeric:tabular-nums; }
@media(max-width:600px) { .yt-after { font-size:12px; } }

.yt-manage { display:block; padding:9px 0; font-size:12px; color:var(--ink2); }
.yt-links { display:flex; flex-wrap:wrap; gap:0 20px; }
.yt-short { color:var(--red); }
.yt-route .yt-route-source { padding-left:0; }
.yt-summary .yt-caption + .yt-caption { margin-top:6px; }
.yt-note { margin:12px 0 0; font-size:12px; line-height:1.45; color:var(--ink2); }
.yt-map-search { margin:12px 0 6px; }
.yt-map-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 12px; align-items:center; min-height:44px; padding:7px 0; border-bottom:1px solid var(--bd); }
.yt-map-row .yt-name-options { grid-column:1 / -1; }
.yt-map-row .yt-period-name { overflow-wrap:anywhere; }

.yt-map-edit { grid-column:1 / -1; display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; min-height:44px; padding:0; color:var(--ink); background:transparent; border:0; font:inherit; }

/* The handoff (Zan, 2026-11-21): only the money that moves. One compact,
   read-only row per envelope: name, then a tinted pill with the signed amount
   and a short arrow. Green "+$500 →" goes into YNAB; gold "← −$200" comes back
   to Shoestring to use elsewhere; red stays for shortfalls.
   On brand (Zan, 2026-11-21): Shoestring's tan paper, not gray and white. A
   cream sheet, manila header and footer bands, and a raised card for the
   total; green is kept for the badge, the total and money going in. */
.yt-dialog { --yt-paper:#f7f0e1; --yt-band:#ebe1cc; --yt-card:#fcf8ee; --yt-rule:rgba(60,48,32,.16);
  --yt-wash:rgba(30,120,88,.07); --yt-wash-line:rgba(30,120,88,.16); --yt-gold-wash:rgba(138,106,24,.15);
  border-radius:14px; border-color:rgba(60,48,32,.24); background:var(--yt-paper);
  box-shadow:0 18px 50px #2923193d, 0 2px 6px #29231914; }
.yt-head { background:var(--yt-band); border-bottom-color:var(--yt-rule); }
.yt-actions { background:var(--yt-band); border-top-color:var(--yt-rule); }
.yt-filter, .yt-envelope-option { background:var(--yt-card); }
.yt-dialog[data-view="summary"] .yt-head h2 { display:flex; align-items:center; gap:9px; }
.yt-dialog[data-view="summary"] .yt-head h2::before { content:""; flex:none; width:28px; height:28px; border-radius:50%;
  background:var(--yt-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.6' stroke-linejoin='round'%3E%3Crect x='5' y='7' width='14' height='10' rx='1.6'/%3E%3Cpath d='m5.6 8 6.4 4.8L18.4 8'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow:0 1px 2px #1e785840; }
.yt-summary { margin:14px 0 12px; padding:14px 16px 13px; border:1px solid var(--yt-rule); border-radius:12px; background:var(--yt-card); box-shadow:0 1px 2px #2923190f; }
.yt-summary .yt-total { font-size:clamp(30px,6vw,36px); }
.yt-summary .yt-caption { color:var(--ink2); font-size:12.5px; }
.yt-summary:has(.yt-short) { border-color:rgba(180,60,50,.24); background:#f8ebe2; }
.yt-flow-list { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:12px; }
.yt-flow-row, .yt-flow-gap { grid-column:1 / -1; display:grid; grid-template-columns:subgrid; align-items:center; }
.yt-flow-row { min-height:36px; padding:2px 2px; border-bottom:1px solid rgba(60,48,32,.11); }
.yt-flow-row:last-child { border-bottom:0; }
.yt-flow-name { display:grid; min-width:0; padding:0; border:0; background:none; color:var(--ink); font:600 13.5px/1.25 var(--ui); text-align:left; }
.yt-flow-title { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.yt-flow-name small { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font:500 11px/1.3 var(--ui); color:var(--ink3); }
.yt-flow-title.is-guarded { display:flex; align-items:center; gap:5px; min-width:0; }
.yt-flow-text { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; min-width:0; }
.yt-lock { width:11px; height:11px; flex:none; fill:none; stroke:var(--ink3); stroke-width:1.2; stroke-linejoin:round; stroke-linecap:round; }
.yt-flow-tap .yt-flow-title { text-decoration:underline dotted; text-decoration-color:var(--ink3); text-underline-offset:3px; }
.yt-flow-row.is-pool .yt-flow-name { color:var(--ink2); font-style:italic; font-weight:500; }
.yt-move { display:inline-flex; align-items:center; justify-content:flex-end; justify-self:end; gap:6px; white-space:nowrap; }
.yt-move.is-in, .yt-move.is-out { padding:3px 8px 3px 10px; border-radius:999px; }
.yt-move.is-out { padding:3px 10px 3px 8px; }
.yt-move.is-in { color:var(--yt-green); background:var(--teal-a); }
.yt-move.is-out { color:var(--gold); background:var(--yt-gold-wash); }
.yt-move.is-even { color:var(--ink3); padding-right:8px; }
.yt-held { font:500 12px/1.3 var(--ui); font-variant-numeric:tabular-nums; color:var(--ink2); }
.yt-move-amt { font:650 12.5px/1.3 var(--ui); font-variant-numeric:tabular-nums; }
.yt-arrow { width:12px; height:12px; flex:none; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.yt-check { width:12px; height:12px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.yt-tag { padding:1px 7px; border-radius:999px; border:1px solid var(--yt-wash-line); color:var(--yt-green); font:650 10.5px/1.4 var(--ui); letter-spacing:.02em; }
.yt-move.is-in .yt-tag { border-color:transparent; background:var(--yt-card); }
.yt-flow-gap { height:8px; border-bottom:1px solid var(--yt-rule); margin-bottom:4px; }
.yt-even { margin-top:10px; }
.yt-even > summary { display:flex; align-items:center; gap:6px; min-height:36px; color:var(--ink2); font:600 12px/1.3 var(--ui); cursor:pointer; list-style:none; }
.yt-even > summary::-webkit-details-marker { display:none; }
.yt-even > summary::before { content:""; width:5px; height:5px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(-45deg); transition:transform .15s; margin-right:3px; }
.yt-even[open] > summary::before { transform:rotate(45deg); }
.yt-even .yt-flow-row { min-height:30px; }
.yt-even .yt-flow-name { font-weight:500; color:var(--ink2); }
.yt-picks { margin-bottom:14px; }
.yt-practice { flex:none; padding:2px 8px; border-radius:999px; background:var(--yt-gold-wash); color:var(--gold); font:700 10px/1.5 var(--ui); letter-spacing:.08em; text-transform:uppercase; }
.yt-actions .yt-status { margin-left:0; }
@media (max-width:600px) {
  .yt-flow-name { font-size:13px; }
  .yt-summary { margin:12px 0 10px; padding:12px 14px; }
}
@media (prefers-reduced-motion:reduce) { .yt-even > summary::before { transition:none; } }
.yt-practice.is-live { background:var(--teal-a); color:var(--yt-green); }

/* Renames (Zan, 2026-11-21): one quiet list under the money. */
.yt-names { margin-top:12px; padding-top:8px; border-top:1px solid var(--yt-rule,var(--bd)); }
.yt-names-title { margin:0 0 4px; color:var(--ink2); font:600 12px/1.3 var(--ui); }
.yt-name-row { display:flex; align-items:center; gap:6px; min-height:30px; font:500 13px/1.3 var(--ui); color:var(--ink); flex-wrap:wrap; }
.yt-name-from { color:var(--ink2); text-decoration:line-through; text-decoration-color:var(--ink3); }
.yt-name-row .yt-arrow { color:var(--ink3); }
.yt-name-row small { margin-left:auto; color:var(--ink3); font:500 11px/1.3 var(--ui); }

/* YNAB targets that follow a Shoestring schedule change (2026-11-24). */
.yt-target-row { flex-wrap:wrap; min-height:44px; cursor:pointer; }
.yt-target-tick { width:18px; height:18px; margin:0 4px 0 0; accent-color:var(--yt-green,#2e7d4f); }
.yt-target-name { flex:1 0 calc(100% - 30px); color:var(--ink); font:600 12px/1.3 var(--ui); }
.yt-target-row .yt-name-from { margin-left:28px; }
.yt-by-hand .yt-note { margin:4px 0 0; }

/* The handoff sheet (Zan, 2026-11-24). This dialog is where Shoestring's plan
   reaches YNAB, so it is the product's centrepiece: calm, legible, and pretty
   without ornament. One sheet of paper, generous space, hairline rules, small
   labelled sections, and controls drawn to match (no browser-default
   checkboxes). It supersedes the manila bands, boxed total, round badge, pills
   and drag-and-drop above. Check it by rendering it, never by reading CSS. */
#ynab-translator.yt-dialog { --yt-edge:24px; --yt-hair:rgba(60,48,32,.09); --yt-soft:rgba(60,48,32,.045);
  width:min(480px,calc(100vw - 24px)); max-height:min(760px,88dvh); inset:0; margin:auto;
  border:1px solid rgba(60,48,32,.12); border-radius:16px; background:#fbf6ea;
  box-shadow:0 24px 64px -12px #2923194d, 0 2px 8px #29231914; font:400 14px/1.45 var(--ui); }
.yt-dialog::backdrop { background:#2a241b66; }
.yt-head, .yt-actions { background:transparent; border:0; }
.yt-head { padding:22px var(--yt-edge) 0; }
.yt-head h2 { margin:3px 40px 0 0; font:500 21px/1.2 var(--serif); letter-spacing:-.012em; }
.yt-dialog[data-view="summary"] .yt-head h2::before { content:none; }
.yt-subtitle { font:500 11px/1.4 var(--ui); letter-spacing:.05em; text-transform:uppercase; color:var(--ink3); }
.yt-dialog .yt-back { margin:0 0 2px; font:500 12px/1.4 var(--ui); color:var(--ink3); text-decoration:none; }
.yt-dialog .yt-back::before { content:"‹ "; }
#ynab-translator > .dialog-close { top:14px; right:14px; width:32px; height:32px; min-height:0; border:0; border-radius:50%;
  background:var(--yt-soft); font-size:17px; line-height:1; color:var(--ink2); }
.yt-scroll { padding:0 var(--yt-edge) 20px; }

/* The headline: what this sync does, or that nothing needs doing. */
.yt-summary { margin:22px 0 20px; padding:0; border:0; border-radius:0; background:none; box-shadow:none; gap:0; }
.yt-summary:has(.yt-short) { border:0; background:none; }
.yt-summary .yt-total { font:500 38px/1 var(--serif); letter-spacing:-.035em; color:var(--yt-green); }
.yt-summary .yt-caption { margin-top:8px; font:400 13.5px/1.45 var(--ui); color:var(--ink2); }
.yt-summary .yt-caption + .yt-caption { margin-top:4px; }
.yt-zero { font:500 20px/1.3 var(--serif); letter-spacing:-.01em; }
.yt-summary.is-settled { display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:14px; align-items:center;
  padding:16px 18px; border-radius:14px; background:rgba(30,120,88,.07); }
.yt-summary.is-settled .yt-seal { grid-row:1 / span 2; width:34px; height:34px; padding:9px; box-sizing:border-box; border-radius:50%;
  background:var(--yt-green); fill:none; stroke:#fff; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.yt-summary.is-settled .yt-zero { font-size:17px; }
.yt-summary.is-settled .yt-caption { margin-top:1px; font-size:12.5px; }

/* Rows of money. */
.yt-flow-list { column-gap:16px; }
.yt-flow-label { grid-column:1 / -1; margin:14px 0 4px; font:600 10.5px/1.4 var(--ui); letter-spacing:.08em; text-transform:uppercase; color:var(--ink3); }
.yt-flow-list > .yt-flow-label:first-child { margin-top:0; }
.yt-flow-row { min-height:42px; padding:0; border-bottom:1px solid var(--yt-hair); }
.yt-flow-row:last-child, .yt-flow-row:has(+ .yt-flow-label) { border-bottom:0; }
.yt-flow-name { font:500 14.5px/1.3 var(--ui); }
.yt-flow-name small { font-size:11.5px; }
.yt-flow-row.is-pool .yt-flow-name { font-style:normal; color:var(--ink2); }
.yt-flow-gap { display:none; }
.yt-move.is-in, .yt-move.is-out { padding:0; border-radius:0; background:none; }
.yt-move-amt { font:600 14.5px/1.3 var(--ui); }
.yt-move .yt-arrow { width:11px; height:11px; opacity:.75; }
.yt-tag { border:0; padding:1px 7px; background:rgba(30,120,88,.1); }
.yt-move.is-in .yt-tag { background:rgba(30,120,88,.1); }

/* Folded detail: every envelope's balance, and targets that differ. */
.yt-even { margin-top:18px; border-top:1px solid var(--yt-hair); }
.yt-even + .yt-even { margin-top:0; }
.yt-even > summary { min-height:46px; justify-content:space-between; flex-direction:row-reverse; gap:10px; font:500 13.5px/1.3 var(--ui); color:var(--ink); }
.yt-even > summary::before { width:6px; height:6px; margin:-3px 5px 0 0; border-color:var(--ink3); transform:rotate(45deg); transition:none; }
.yt-even[open] > summary::before { margin-top:4px; transform:rotate(-135deg); }
.yt-even > .yt-flow-list, .yt-even > .yt-note, .yt-even > .yt-target-row:last-child { margin-bottom:10px; }
.yt-even .yt-flow-row { min-height:34px; border-bottom:0; }
.yt-even .yt-flow-name { font:400 13.5px/1.3 var(--ui); color:var(--ink2); }
.yt-held { font:400 13px/1.3 var(--ui); color:var(--ink2); }
.yt-move.is-even { gap:8px; padding-right:0; }
.yt-move.is-even .yt-check { width:10px; height:10px; color:var(--yt-green); opacity:.55; }
.yt-note { margin:0 0 6px; font:400 12.5px/1.45 var(--ui); color:var(--ink3); }
.yt-by-hand .yt-note { margin:0 0 8px; color:var(--ink2); }
/* One quiet link to the item, so a target difference can be settled in Shoestring. */
.yt-by-hand .yt-open-item { display:block; margin:-4px 0 12px; padding:6px 0; font:500 12.5px/1.4 var(--ui); text-align:left; }

/* Targets to update: a drawn tick box, never the browser's. */
.yt-target-row { display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:12px; row-gap:2px; align-items:center;
  min-height:0; margin:0 -10px; padding:10px; border-radius:10px; cursor:pointer; }
.yt-target-row:has(.yt-target-tick:checked) { background:rgba(30,120,88,.07); }
.yt-target-tick { appearance:none; -webkit-appearance:none; grid-row:1 / span 2; display:grid; place-content:center; width:22px; height:22px; margin:0;
  border:1.5px solid rgba(60,48,32,.32); border-radius:7px; background:#fffdf7; cursor:pointer; transition:background .12s, border-color .12s; }
.yt-target-tick::after { content:""; width:10px; height:5px; margin-top:-2px; border:solid #fff; border-width:0 0 2px 2px; transform:rotate(-45deg) scale(0); transition:transform .12s; }
.yt-target-tick:checked { background:var(--yt-green); border-color:var(--yt-green); }
.yt-target-tick:checked::after { transform:rotate(-45deg) scale(1); }
.yt-target-tick:focus-visible { outline:2px solid var(--navy); outline-offset:2px; }
.yt-target-tick:disabled { opacity:.5; cursor:default; }
.yt-target-name { grid-column:2; font:500 14.5px/1.3 var(--ui); color:var(--ink); }
.yt-target-detail { grid-column:2; display:flex; flex-wrap:wrap; align-items:center; gap:6px; font:400 12.5px/1.35 var(--ui); color:var(--ink3); }
.yt-target-row .yt-target-detail .yt-name-from { margin-left:0; text-decoration:none; color:var(--ink3); }
.yt-target-detail .yt-name-to { color:var(--ink); font-weight:500; }
.yt-target-detail .yt-arrow { width:10px; height:10px; color:var(--ink3); }
.yt-target-flag { flex-basis:100%; color:var(--gold); font:500 11.5px/1.35 var(--ui); }
.yt-names { margin-top:18px; padding-top:14px; border-top:1px solid var(--yt-hair); }
.yt-names-title { margin:0 0 4px; font:600 10.5px/1.4 var(--ui); letter-spacing:.08em; text-transform:uppercase; color:var(--ink3); }

.yt-links { margin-top:6px; padding-top:14px; gap:0 20px; border-top:1px solid var(--yt-hair); }
.yt-manage { padding:2px 0; font:500 12.5px/1.4 var(--ui); color:var(--ink2); text-decoration:none; }
.yt-manage::after { content:" ›"; color:var(--ink3); }

/* Footer: one line of status, one action. */
.yt-actions { padding:12px var(--yt-edge) 16px; gap:10px; border-top:1px solid var(--yt-hair); }
.yt-status { font:400 12px/1.4 var(--ui); color:var(--ink3); }
.yt-practice, .yt-practice.is-live { display:inline-flex; align-items:center; gap:6px; padding:0; background:none; font:600 10.5px/1.5 var(--ui); letter-spacing:.07em; }
.yt-practice::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.yt-primary, .yt-secondary { padding:8px 18px; border-radius:10px; font:600 13.5px/1.4 var(--ui); }
.yt-primary { border:0; box-shadow:0 1px 2px #1e785833; }
.yt-secondary { background:transparent; border:1px solid rgba(60,48,32,.2); }

/* Linking: a plain list to tap. */
.yt-pair-layout { display:block; margin:20px 0 0; }
.yt-pair-source { display:grid; gap:3px; margin-bottom:6px; padding:14px 16px; border-radius:12px; background:var(--yt-soft); }
.yt-pair-source strong { font:500 17px/1.25 var(--serif); }
.yt-pair-current { margin:0; padding:0; border:0; font:400 13px/1.4 var(--ui); color:var(--ink2); }
.yt-dest-title { display:none; }
.yt-chooser .yt-flow-label { margin-top:18px; }
.yt-pair-instruction { margin:4px 0 0; font:400 13px/1.45 var(--ui); color:var(--ink2); }
.yt-category-search { margin:4px 0 6px; }
.yt-filter { border:1px solid rgba(60,48,32,.16); border-radius:10px; padding:9px 12px; background:#fffdf7; font:400 14px var(--ui); }
.yt-category-list { gap:0; max-height:clamp(170px,40vh,330px); }
.yt-envelope-option { min-height:50px; padding:6px 0; border:0; border-bottom:1px solid var(--yt-hair); border-radius:0; background:none; }
.yt-envelope-option:last-child { border-bottom:0; }
.yt-envelope-option .yt-mail { display:none; }
.yt-envelope-option::after { content:"›"; color:var(--ink3); font-size:17px; margin-left:4px; }
.yt-envelope-option.is-new strong { color:var(--yt-green); }
.yt-option-label strong { font:500 14.5px/1.3 var(--ui); }
.yt-option-label small { font:400 12px/1.35 var(--ui); color:var(--ink3); }
.yt-option-balance { font:400 13px/1.3 var(--ui); color:var(--ink2); }
.yt-pair-alternatives { border-top:1px solid var(--yt-hair); margin-top:8px; padding:14px 0 0; }
.yt-pair-alternatives .yt-link, .yt-name-options > summary, .yt-name-options .yt-link { font:500 13px/1.4 var(--ui); color:var(--ink2); text-decoration:none; }
.yt-name-options { margin-top:16px; }
.yt-map-search { margin:18px 0 4px; }
.yt-map-list { margin-top:14px; }
.yt-map-row { padding:0; min-height:0; border-bottom:1px solid var(--yt-hair); }
.yt-map-row:last-child { border-bottom:0; }
.yt-map-edit { min-height:54px; }
.yt-period-name strong { font:500 14.5px/1.3 var(--ui); }
.yt-period-name small { font:400 12px/1.35 var(--ui); color:var(--ink3); }
.yt-choice-action { font:500 12.5px/1.4 var(--ui); color:var(--yt-green); text-decoration:none; }
.yt-choice-action::after { content:" ›"; }
.yt-route { border-bottom:1px solid var(--yt-hair); }
.yt-picks { margin-bottom:10px; border-top:0; }
@media (hover:hover) {
  .yt-envelope-option:hover strong, .yt-manage:hover, .yt-map-edit:hover strong { color:var(--yt-green); }
  #ynab-translator > .dialog-close:hover { background:rgba(60,48,32,.09); }
  .yt-target-row:hover .yt-target-tick:not(:checked) { border-color:var(--yt-green); }
}
@media (prefers-reduced-motion:reduce) { .yt-target-tick, .yt-target-tick::after { transition:none; } }
/* Phones: a sheet that rises from the bottom, where the thumb is. */
@media (max-width:600px) {
  #ynab-translator.yt-dialog { --yt-edge:20px; inset:auto 0 0 0; width:100%; max-width:100%; max-height:90dvh; margin:0;
    border-width:1px 0 0; border-radius:20px 20px 0 0; box-shadow:0 -12px 40px #29231933; }
  .yt-head { padding-top:20px; }
  .yt-flow-row { min-height:46px; }
  .yt-even .yt-flow-row { min-height:36px; }
  .yt-actions { flex-wrap:nowrap; padding:12px var(--yt-edge) max(16px,env(safe-area-inset-bottom)); }
  .yt-actions button { min-height:44px; padding:0 22px; }
  .yt-primary { font-size:14.5px; }
  #ynab-translator > .dialog-close { top:12px; right:12px; width:36px; height:36px; }
  .yt-target-row { padding:12px 10px; }
  .yt-envelope-option { min-height:54px; }
  .yt-filter { font-size:16px; }
}

/* Finishing (Zan, 2026-11-25: "now that it works, make it elegant"). The
   money sits on two sheets of paper, Taking from over Adding to, joined by a
   small round mark that shows the direction of travel. Type steps are fewer
   and calmer; amounts share the headline's serif figures. */
#ynab-translator.yt-dialog { --yt-sheet:#fffcf5; --yt-sheet-line:rgba(60,48,32,.1); --yt-hair:rgba(60,48,32,.08);
  background:#faf5e9; border-color:rgba(60,48,32,.14);
  box-shadow:0 32px 80px -24px #29231966, 0 12px 28px -18px #2923194d, 0 0 0 1px #ffffff80 inset; }
.yt-head { padding-top:24px; }
.yt-subtitle { font:600 10.5px/1.4 var(--ui); letter-spacing:.09em; color:var(--ink3); }
.yt-head h2 { margin-top:5px; font:500 23px/1.15 var(--serif); letter-spacing:-.015em; }
#ynab-translator > .dialog-close { top:18px; right:18px; width:30px; height:30px; background:transparent; color:var(--ink3);
  box-shadow:inset 0 0 0 1px var(--yt-hair); font-size:16px; }

/* Headline: the total, with its caption set close under it. */
.yt-summary { margin:20px 0 22px; }
.yt-summary .yt-total { font:500 44px/1 var(--serif); letter-spacing:-.04em; font-variant-numeric:lining-nums tabular-nums; }
.yt-summary .yt-caption { margin-top:6px; font-size:13.5px; color:var(--ink2); }
.yt-summary.is-settled { padding:16px 18px; border:1px solid rgba(30,120,88,.14); border-radius:16px; background:rgba(30,120,88,.06); }

/* The two sheets. */
.yt-flow-sheets { display:grid; grid-template-columns:minmax(0,1fr) auto; column-gap:16px; }
.yt-flow-group { grid-column:1 / -1; display:grid; grid-template-columns:subgrid; padding:4px 16px 6px;
  border:1px solid var(--yt-sheet-line); border-radius:14px; background:var(--yt-sheet);
  box-shadow:0 1px 2px rgba(41,35,25,.04), 0 6px 16px -12px rgba(41,35,25,.18); }
.yt-flow-group > .yt-flow-label, .yt-flow-sheets .yt-flow-group > .yt-flow-label:first-child { margin:12px 0 2px; font:600 10px/1.4 var(--ui); letter-spacing:.1em; color:var(--ink3); }
.yt-flow-group > .yt-flow-row { min-height:46px; border-bottom:1px solid var(--yt-hair); }
.yt-flow-group > .yt-flow-row:last-child { border-bottom:0; }
.yt-flow-seam { grid-column:1 / -1; justify-self:center; position:relative; z-index:1; box-sizing:border-box; width:26px; height:26px; margin:-9px 0;
  padding:7px; border:1px solid var(--yt-sheet-line); border-radius:50%; background:#faf5e9; color:var(--ink3);
  fill:none; stroke:currentColor; stroke-width:1.3; stroke-linecap:round; stroke-linejoin:round; }
.yt-flow-name { font:500 14.5px/1.3 var(--ui); }
.yt-flow-name small { margin-top:2px; font:400 12px/1.35 var(--ui); color:var(--ink3); }
.yt-flow-row.is-pool .yt-flow-name { color:var(--ink2); }
.yt-move { gap:7px; }
.yt-move-amt { font:500 16px/1.2 var(--serif); letter-spacing:-.01em; font-variant-numeric:lining-nums tabular-nums; }
.yt-move .yt-arrow { width:10px; height:10px; opacity:.5; }
.yt-tag, .yt-move.is-in .yt-tag { padding:2px 7px 1px; border-radius:999px; background:rgba(30,120,88,.09); color:var(--yt-green);
  font:600 9.5px/1.4 var(--ui); letter-spacing:.09em; text-transform:uppercase; }

/* Folded detail and the quiet links: rows on the page, not more boxes. */
.yt-flow-sheets + .yt-even, .yt-flow-sheets + .yt-names { margin-top:20px; }
.yt-even { border-top-color:var(--yt-hair); }
.yt-even > summary { min-height:48px; font:500 13.5px/1.3 var(--ui); color:var(--ink2); }
@media (hover:hover) { .yt-even > summary:hover { color:var(--ink); } }
.yt-even[open] > summary { color:var(--ink); }
.yt-even > .yt-flow-list { margin:0 0 14px; padding:4px 16px; border:1px solid var(--yt-sheet-line); border-radius:14px; background:var(--yt-sheet); }
.yt-even .yt-flow-row { min-height:36px; border-bottom:1px solid var(--yt-hair); }
.yt-even .yt-flow-row:last-child { border-bottom:0; }
.yt-even .yt-flow-name { font:400 13.5px/1.3 var(--ui); }
.yt-held { font:400 14px/1.2 var(--serif); font-variant-numeric:lining-nums tabular-nums; color:var(--ink2); }
.yt-links { margin-top:0; padding-top:14px; gap:0 22px; border-top-color:var(--yt-hair); }
.yt-manage { font-size:12.5px; color:var(--ink3); }

/* Footer: status on the left, one confident button on the right. */
.yt-actions { padding:14px var(--yt-edge) 18px; border-top-color:var(--yt-hair); background:linear-gradient(#faf5e900,#f6efe0 70%); }
.yt-practice, .yt-practice.is-live { font-size:10px; letter-spacing:.1em; }
.yt-practice.is-live::before { box-shadow:0 0 0 3px rgba(30,120,88,.14); }
.yt-primary { padding:10px 22px; border-radius:12px; font:600 14px/1.3 var(--ui); letter-spacing:.005em;
  box-shadow:inset 0 1px 0 #ffffff24, 0 1px 2px #1e785840, 0 8px 18px -10px #1e7858b3; }
@media (hover:hover) {
  #ynab-translator .yt-primary:hover:enabled { filter:brightness(.93); }
  #ynab-translator > .dialog-close:hover { background:rgba(60,48,32,.06); color:var(--ink); }
}
@media (max-width:600px) {
  #ynab-translator.yt-dialog { border-width:1px 0 0; box-shadow:0 -16px 48px -16px #2923194d; }
  .yt-head { padding-top:22px; }
  .yt-summary .yt-total { font-size:40px; }
  .yt-flow-group { padding:2px 14px 4px; }
  .yt-flow-group > .yt-flow-row { min-height:48px; }
  #ynab-translator > .dialog-close { top:14px; right:14px; width:36px; height:36px; }
}
/* Lora's tabular figures run wide; proportional lining figures read as print. */
.yt-summary .yt-total, .yt-move-amt, .yt-held { font-variant-numeric:lining-nums proportional-nums; }
.yt-flow-group .yt-flow-name small { white-space:normal; overflow:visible; }
.yt-head { padding-bottom:12px; border-bottom:1px solid transparent; transition:border-color .15s; }
.yt-head.is-scrolled { border-bottom-color:var(--yt-hair); }
.yt-scroll { padding-top:0; }
.yt-summary { margin-top:8px; }
.yt-even + .yt-names { margin-top:0; }
@media (prefers-reduced-motion:reduce) { .yt-head { transition:none; } }
