/* GV1 planner, restyled in GY11 to the canvas screens PlannerEmpty, Planner and TravellerPhone. Gyyde tokens only (brand-gyyde): no raw hex,
   no palette step, no colour function. The page has a strict content policy (style-src 'self'): every value is a class here, never an inline style.
   Below 700 px: the phone column (one day at a time, day chips). From 700 px: a top bar, then all days in one list with the add-link column beside it. */
.tp { display: flex; flex-wrap: wrap; min-height: 100vh; }
.tp-col { flex: 1 1 100%; max-width: 430px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.tp-bar { padding: 16px; display: flex; align-items: center; gap: 10px; }
.tp-bar h1 { margin: 0; font: 800 22px/1.15 var(--gy-font-display); }
.tp-icon { width: 44px; height: 44px; border-radius: var(--gy-radius-button); box-shadow: inset 0 0 0 2px var(--gy-border-strong); display: flex; align-items: center; justify-content: center; color: var(--gy-text); background: none; border: 0; cursor: pointer; }
.tp-days { display: flex; gap: 6px; padding: 6px 16px 14px; overflow-x: auto; }
.tp-days button { flex: none; width: 52px; min-height: 52px; padding: 8px 0; text-align: center; border: 0; border-radius: var(--gy-radius-button); background: var(--gy-surface); color: var(--gy-text); font: 400 12px/1.2 var(--gy-font-body); cursor: pointer; }
.tp-days button b { display: block; font: 800 22px/1 var(--gy-font-display); }
.tp-days button[aria-current] { background: var(--gy-trips); color: var(--gy-on-trips); font-weight: 600; }
.tp-main { flex: 1; padding: 6px 16px 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tp-main h1:focus, .tp-main h2:focus { outline: none; }
.tp-main h1:focus-visible, .tp-main h2:focus-visible { outline: 2px solid var(--gy-focus); outline-offset: 4px; }
.tp-foot { position: sticky; bottom: 0; padding: 14px 16px 24px; background: var(--gy-bg); border-top: 1px solid var(--gy-rule); display: flex; flex-direction: column; gap: 8px; }
.tp-card { background: var(--gy-surface); padding: 16px; border-radius: 16px; display: flex; flex-direction: column; gap: 14px; }
.tp-row { display: flex; flex-wrap: wrap; gap: 12px; } .tp-row > * { flex: 1 1 170px; min-width: 0; }
.tp-split { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-chip { min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--gy-radius-button); background: var(--gy-surface); color: var(--gy-text); box-shadow: inset 0 0 0 2px var(--gy-border-strong); font: 600 14px/1 var(--gy-font-body); cursor: pointer; }
.tp-chip[aria-pressed="true"] { background: var(--gy-trips); color: var(--gy-on-trips); box-shadow: none; }
.tp-src { font: 600 12px/1.3 var(--gy-font-body); color: var(--gy-trips-text); }
.tp-notice { padding: 12px 14px; border-left: 4px solid var(--gy-trips); background: var(--gy-surface); }
.tp-error { padding: 12px 14px; border-left: 4px solid var(--gy-error); background: var(--gy-error-bg); font-weight: 600; }
.tp-check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.tp-stay { background: var(--gy-surface); padding: 14px; border-radius: 16px; }
.tp-acts { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 6px; }
.tp-link { background: none; border: 0; padding: 0; min-height: 28px; font: inherit; cursor: pointer; text-align: left; }
.tp-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--gy-rule); }
.tp-item:last-child { border-bottom: 0; }
.tp-cols { display: flex; flex-wrap: wrap; gap: 32px 48px; }
.tp-cols > section { flex: 1 1 300px; min-width: 0; }
.tp-cols > .tp-wide { flex: 2 1 420px; min-width: 0; }
.tp-side-col { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.tp-linkrow { display: flex; gap: 10px; flex-wrap: wrap; } .tp-linkrow .gy-input { flex: 1 1 200px; width: auto; }
.tp-heading { font: 800 clamp(28px, 3.6vw, 48px)/1.1 var(--gy-font-display); letter-spacing: -0.03em; margin: 6px 0 0; }
.tp-hl { color: var(--gy-brand-text); }
.tp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gy-status-done); margin-right: 6px; }
.tp-desk-only { display: none; }
.tp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tp-skip { position: absolute; left: -9999px; }
.tp-skip:focus { left: 8px; top: 8px; z-index: 10; background: var(--gy-surface); padding: 10px 14px; }
.gy-btn:focus-visible, .tp-chip:focus-visible, .tp-link:focus-visible, .tp-days button:focus-visible, .tp-icon:focus-visible, .gy-input:focus-visible, .gy-select:focus-visible { outline: 2px solid var(--gy-focus); outline-offset: 2px; }

/* GV2: the "Save this trip" card (PlannerSave screen) */
.tp-note { padding: 12px 14px; border-left: 4px solid var(--gy-trips); background: var(--gy-surface-sunk); display: flex; flex-direction: column; gap: 8px; }
.tp-note-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.tp-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* Days: a card for each day (Planner screen). On a phone only the current day shows. */
.tp-days-list { display: flex; flex-direction: column; gap: 18px; }
.tp-day { background: var(--gy-surface); border-radius: var(--gy-radius-card); box-shadow: inset 0 0 0 2px var(--gy-border-strong); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.tp-day__h { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font: 700 18px/1.3 var(--gy-font-body); }
.tp-day__n { font: 800 28px/1 var(--gy-font-display); letter-spacing: -0.03em; }
.tp-day__d { font-weight: 600; color: var(--gy-text-muted); }

/* Start: the hero and the three steps (PlannerEmpty screen) */
.tp-top { display: none; }
.tp-band { padding: 8px 0 0; }
.tp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.tp-step { background: var(--gy-surface); border-radius: 16px; box-shadow: inset 0 0 0 2px var(--gy-border-strong); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.tp-step__n { width: 32px; height: 32px; border-radius: 50%; background: var(--gy-trips); color: var(--gy-on-trips); display: flex; align-items: center; justify-content: center; font: 800 16px/1 var(--gy-font-display); }
.tp-logo-dark { display: none; }
:root[data-theme="dark"] .tp-logo-light { display: none; } :root[data-theme="dark"] .tp-logo-dark { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tp-logo-light { display: none; } :root:not([data-theme="light"]) .tp-logo-dark { display: block; } }
@media (max-width: 699px) {
  .tp-day:not([data-current]) { display: none; }
  .tp-main > .tp-u19 .tp-heading, .tp-main > .tp-u19 .gy-muted { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tp-start .tp-heading { font-size: 30px; }
}
@media (min-width: 700px) {
  .tp-col { flex: 1 1 auto; max-width: none; margin: 0; }
  .tp-bar, .tp-days { display: none; }
  .tp-top { display: block; padding: 20px clamp(16px, 4vw, 56px); border-bottom: 1px solid var(--gy-rule); }
  .tp-desk-only { display: block; }
  .tp-main { padding: clamp(20px, 3vw, 40px) clamp(16px, 4vw, 56px) 48px; gap: 32px; }
  .tp-foot { position: static; padding: 20px clamp(16px, 4vw, 56px) 32px; max-width: 520px; }
  .tp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Utility classes for planner.js (`u:` values). One class for each distinct set of declarations. */
.tp-u1 { display:flex; flex-direction:column; gap:4px; }
.tp-u2 { font-size:22px; font-weight:800; }
.tp-u4 { margin-top:8px; }
.tp-u5 { margin:0 0 8px; }
.tp-u6 { display:flex; gap:8px; flex-wrap:wrap; }
.tp-u9 { flex:1; min-width:0; }
.tp-u10 { font-weight:600; color:var(--gy-trips-text); }
.tp-u11 { flex:none; }
.tp-u12 { font-weight:600; color:var(--gy-error); }
.tp-u13 { margin:0; max-width:640px; }
.tp-u14 { font-size:24px; margin:0 0 14px; }
.tp-u15 { display:flex; gap:10px; flex-wrap:wrap; }
.tp-u16 { margin-top:6px; }
.tp-u17 { display:flex; align-items:center; gap:10px; font-size:24px; margin-bottom:6px; flex-wrap:wrap; }
.tp-u18 { font-size:24px; margin:0 0 6px; }
.tp-u19 { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-end; gap:16px; }
.tp-u20 { max-width:820px; }
.tp-u21 { margin-bottom:12px; }
.tp-u22 { height:28px; }
.tp-u23 { text-align:center; }
.tp-u24 { font-size:20px; margin:0; }
.tp-u25 { font-size:20px; margin:0 0 8px; }
.tp-u26 { margin:6px 0 0; }
.tp-u27 { display:flex; flex-direction:column; gap:20px; }
.tp-u28 { display:flex; flex-wrap:wrap; gap:10px; }
.tp-u29 { font-weight: 600; }

/* GY11: the date field and its calendar (design: Controls, section 11). A typed DD/MM/YYYY field and a 44 px button; the panel opens under the field.
   Below 700 px it is a sheet at the foot of the page. Semantic tokens only. Chosen days use the Trips accent, as the chips do (the screen's ultramarine has no on-colour token). */
.tp-date { position: relative; min-width: 0; }
.tp-date__row { display: flex; gap: 8px; align-items: stretch; position: relative; }
.tp-date__row .gy-input { flex: 1 1 auto; min-width: 0; width: auto; }
.tp-datebtn { flex: none; }
.tp-cal { position: absolute; top: calc(100% + 6px); left: 0; z-index: 10; width: 320px; max-width: calc(100vw - 32px); padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--gy-bg); color: var(--gy-text); border: 2px solid var(--gy-border-strong); border-radius: 16px; }
.tp-row > .tp-date:last-child .tp-cal { left: auto; right: 0; }
.tp-cal__head { display: flex; align-items: center; gap: 8px; }
.tp-cal__month { flex: 1; text-align: center; font: 800 18px/1.2 var(--gy-font-display); }
.tp-cal__nav { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; background: none; color: var(--gy-text); border: 0; border-radius: var(--gy-radius-button); box-shadow: inset 0 0 0 2px var(--gy-border-strong); cursor: pointer; }
.tp-cal__grid { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.tp-cal__grid th { padding: 4px 0; text-align: center; font: 800 11px/1.2 var(--gy-font-body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gy-text-muted); }
.tp-cal__grid td { padding: 0; }
.tp-cal__day { width: 100%; min-height: 44px; display: grid; place-items: center; padding: 0; font: 600 14px/1 var(--gy-font-body); font-variant-numeric: tabular-nums; color: var(--gy-text); background: none; border: 1px solid transparent; border-radius: var(--gy-radius-button); cursor: pointer; }
.tp-cal__day.is-range { background: var(--gy-status-progress); color: var(--gy-on-status-progress); }
.tp-cal__day.is-edge, .tp-cal__day.is-selected { background: var(--gy-trips); color: var(--gy-on-trips); font-weight: 800; }
.tp-cal__day.is-today { box-shadow: inset 0 0 0 2px var(--gy-border-strong); }
.tp-cal__day.is-off { background: var(--gy-surface-sunk); color: var(--gy-text-muted); text-decoration: line-through; cursor: not-allowed; }
.tp-cal__foot { display: flex; justify-content: flex-end; }
.tp-cal__nav:focus-visible, .tp-cal__day:focus-visible, .tp-cal__close:focus-visible { outline: 2px solid var(--gy-focus); outline-offset: 2px; }
@media (max-width: 699px) {
  .tp-cal, .tp-row > .tp-date:last-child .tp-cal { position: fixed; top: auto; left: 0; right: 0; bottom: 0; z-index: 20; width: auto; max-width: none; margin: 0; padding: 16px 16px 24px; border-width: 2px 0 0; border-radius: 16px 16px 0 0; max-height: 90vh; overflow-y: auto; }
  .tp-cal__foot .gy-btn { flex: 1; }
}
