/* Whereabouts' own styles: only what the house shell does not already provide.
   The shell gives .signin, .field, .section, .sheet, .btn, .chip, .page-head and
   the --sh-* tokens. Everything here is the calendar, the counts and the editor.

   The accent comes from brand-whereabouts.css through --sh-accent. The one other
   set of colours is the country palette in app.js: that is data, not chrome, and
   each colour is mixed into the surface so it works in both themes.

   House style: UK English, no em dashes. */

/* ---------- sign-in extras (as Intel) ---------- */
.signin__eyebrow {
  font-family: var(--sh-mono);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--sh-accent-2); margin-bottom: 10px;
}
.signin .gate-status { font-size: 12.5px; color: var(--sh-muted); margin: 14px 0 0; min-height: 1.2em; }
.signin .gate-status.is-err { color: #f0866f; }
.signin .gate-foot { margin: 26px 0 0; font-size: 12px; color: var(--sh-faint); }
.signin .gate-foot a { color: var(--sh-faint); text-decoration: none; }
.sidebar-foot a { color: inherit; text-decoration: none; }

:root { --stop: #f0866f; --warn: #E8A13C; --ok: #4ade80; }

.lede { color: var(--sh-muted); font-size: 15px; line-height: 1.6; margin: 0 0 20px; text-align: justify; hyphens: auto; }
.loading { color: var(--sh-faint); font-size: 13.5px; }
.loading.is-err { color: var(--stop); }
.muted { color: var(--sh-muted); }
.faint { color: var(--sh-faint); }
.mono { font-family: var(--sh-mono); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* min(): a card never asks for more width than a phone has. */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; margin-bottom: 16px; }
.card {
  background: var(--sh-surface); border: 1px solid var(--sh-rule);
  border-radius: var(--sh-radius); padding: 18px 18px 16px;
}
.card h2 { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--sh-muted); margin: 0 0 10px; }
.card .big { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -.02em; color: var(--sh-fog); }
.card .big small { font-size: 16px; font-weight: 500; color: var(--sh-faint); margin-left: 4px; }
.card p { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--sh-fog); }

.note-block {
  border-radius: var(--sh-radius-sm); padding: 11px 14px; margin: 0 0 12px;
  font-size: 13.5px; line-height: 1.55; border: 1px solid var(--sh-rule); border-left-width: 3px;
  background: var(--sh-surface-2); color: var(--sh-fog);
}
.note-block.is-info { border-left-color: var(--sh-accent); }
.note-block.is-warn { border-left-color: var(--warn); }
.note-block.is-stop { border-left-color: var(--stop); }

/* ---------- the count tiles ---------- */
.card p.rule { margin: -4px 0 12px; font-size: 12.5px; color: var(--sh-muted); }
.yh { font-size: 15px; margin: 26px 0 10px; color: var(--sh-fog); }
.yh span { font-size: 12.5px; font-weight: 500; color: var(--sh-faint); margin-left: 8px; }
.tile.is-warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--sh-rule)); }
.tile.is-stop { border-color: color-mix(in srgb, var(--stop) 65%, var(--sh-rule)); }
.tile.is-stop .big { color: var(--stop); }
.bar { position: relative; height: 10px; border-radius: 999px; background: var(--sh-surface-3, var(--sh-surface-2)); margin: 16px 0 22px; }
.bar__done, .bar__plan { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; }
.bar__plan { background: color-mix(in srgb, var(--sh-accent) 35%, transparent); }
.bar__done { background: var(--sh-accent); }
.tile.is-stop .bar__done { background: var(--stop); }
.tile.is-stop .bar__plan { background: color-mix(in srgb, var(--stop) 40%, transparent); }
.bar__mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--sh-fog); opacity: .7; }
.bar__mark.is-soft { opacity: .4; }
.bar__mark span {
  position: absolute; top: 18px; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--sh-mono); font-size: 10.5px; color: var(--sh-muted);
}

/* ---------- ties ---------- */
.ties { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ties td { padding: 8px 6px; border-top: 1px solid var(--sh-rule-soft, var(--sh-rule)); vertical-align: top; }
.ties td:first-child { white-space: nowrap; font-weight: 600; color: var(--sh-fog); }
.ties td:last-child { color: var(--sh-muted); }
.pill {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--sh-surface-2); color: var(--sh-muted); white-space: nowrap;
}
.pill.is-met { background: color-mix(in srgb, var(--stop) 22%, transparent); color: var(--stop); }
.pill.is-warn { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.pill.is-clear { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--sh-rule); border-radius: var(--sh-radius-sm); margin-bottom: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: var(--sh-muted); padding: 9px 10px; background: var(--sh-surface-2); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-top: 1px solid var(--sh-rule); color: var(--sh-fog); white-space: nowrap; }
.tbl tr.is-click { cursor: pointer; }
.tbl tr.is-click:hover td { background: var(--sh-surface-2); }
.tbl tr.is-on td { background: color-mix(in srgb, var(--sh-accent) 10%, transparent); }

/* ---------- the calendar ---------- */
.cal-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cal-tools select, .cal-tools input { width: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; font-size: 12.5px; color: var(--sh-muted); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--c); }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(268px, 100%), 1fr)); gap: 18px; }
.month h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--sh-fog); }
.month h3 span { color: var(--sh-faint); font-weight: 500; margin-left: 6px; font-size: 12px; }
.wk, .mgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.wk div { font-size: 10.5px; color: var(--sh-faint); text-align: center; padding-bottom: 3px; font-family: var(--sh-mono); }
.day {
  position: relative; aspect-ratio: 1 / 1; min-width: 0; padding: 3px 0 0;
  border: 1px solid transparent; border-radius: 6px; cursor: pointer;
  background: color-mix(in srgb, var(--c, transparent) 38%, var(--sh-surface));
  color: var(--sh-fog); font: inherit; font-size: 11.5px; line-height: 1.1; text-align: center;
  display: flex; flex-direction: column; align-items: center; overflow: hidden;
}
.day.is-empty { background: var(--sh-surface); border: 1px dashed var(--sh-rule); color: var(--sh-faint); }
.day.is-pad { visibility: hidden; }
.day:hover { border-color: var(--sh-muted); }
.day.is-today { box-shadow: 0 0 0 2px var(--sh-accent); }
.day.is-sel { border-color: var(--sh-fog); box-shadow: 0 0 0 2px var(--sh-fog); }
.day.is-past { opacity: .62; }
.day .p { font-size: 8.5px; color: var(--sh-fog); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 92%; margin-top: 1px; }
.day .m { position: absolute; bottom: 2px; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; }
.day .m b { width: 5px; height: 5px; border-radius: 50%; background: var(--sh-fog); }
.day .m b.es { background: #f5b642; }
.day .m b.wk3 { background: #e5484d; border-radius: 1px; }
.day .m b.nc { background: transparent; border: 1.5px solid var(--sh-fog); }
.day .m b.bd { background: #f472b6; }
.day .bd-n { color: #f9a8d4; }
.day .av { position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.day .av.remote { background: #38bdf8; }
.day .av.in_person { background: var(--ok); }
.day .av.away { background: var(--stop); }
.av-tag { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.av-tag.remote { background: color-mix(in srgb, #38bdf8 22%, transparent); color: #38bdf8; }
.av-tag.in_person { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.av-tag.away { background: color-mix(in srgb, var(--stop) 22%, transparent); color: var(--stop); }
@media (max-width: 560px) { .day .p { display: none; } .months { grid-template-columns: 1fr; } }

/* ---------- the day editor ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 60; }
.panel {
  position: fixed; top: var(--pvbar-h, 0px); right: 0; bottom: 0; width: min(440px, 100vw); z-index: 61;
  background: var(--sh-surface); border-left: 1px solid var(--sh-rule);
  overflow-y: auto; padding: 18px 18px 28px; box-shadow: var(--sh-shadow);
}
@media (max-width: 640px) {
  .panel { top: auto; left: 0; width: 100vw; max-height: 88vh; border-left: 0; border-top: 1px solid var(--sh-rule); border-radius: 16px 16px 0 0; }
}
.panel h2 { font-size: 17px; margin: 0 0 2px; color: var(--sh-fog); }
.panel .sub { font-size: 12.5px; color: var(--sh-muted); margin: 0 0 14px; }
.panel .x { position: absolute; top: 12px; right: 12px; }
.panel .field { margin-bottom: 12px; }
.panel .chips { margin-bottom: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--sh-fog); margin: 4px 0 12px; }
.check input { width: auto; }
.impact { margin: 6px 0 14px; }
.impact .ln { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--sh-rule); color: var(--sh-fog); }
.impact .ln b { font-family: var(--sh-mono); font-weight: 600; color: var(--sh-fog); white-space: nowrap; }
.impact .ln b.is-up { color: var(--warn); }
.impact .ln b.is-stop { color: var(--stop); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 18px; }
.notes { margin-top: 8px; border-top: 1px solid var(--sh-rule); padding-top: 14px; }
.notes h3 { font-size: 13px; margin: 0 0 10px; color: var(--sh-muted); font-weight: 600; }
.nt { background: var(--sh-surface-2); border-radius: var(--sh-radius-sm); padding: 10px 12px; margin-bottom: 8px; }
.nt.is-resolved { opacity: .55; }
.nt .body { white-space: pre-wrap; font-size: 13.5px; color: var(--sh-fog); margin-bottom: 8px; }
.nt .row select { width: auto; font-size: 12px; padding: 3px 6px; }
.aud { font-size: 11px; font-family: var(--sh-mono); color: var(--sh-faint); }

/* ---------- now / next ---------- */
.runs { list-style: none; margin: 0; padding: 0; }
.runs li { display: flex; gap: 12px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--sh-rule); font-size: 14px; }
.runs li:first-child { border-top: 0; }
.runs .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; align-self: center; }
.runs .when { color: var(--sh-muted); font-size: 12.5px; min-width: 150px; font-family: var(--sh-mono); }
.runs .what { color: var(--sh-fog); font-weight: 600; }
.runs .xtra { color: var(--sh-muted); font-size: 12.5px; }
.preview-banner { margin-bottom: 14px; }

/* ---------- flights and the hover card ---------- */
.day .fl { position: absolute; top: 2px; right: 3px; font-style: normal; font-size: 9px; line-height: 1; color: var(--sh-fog); opacity: .85; }
.nav-count { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 18px; text-align: center; padding: 1px 6px; border-radius: 999px; background: var(--sh-accent); color: var(--sh-on-accent); }
.fl-row { flex-wrap: wrap; }
details.card summary::-webkit-details-marker { color: var(--sh-muted); }
.hovercard {
  position: fixed; z-index: 70; max-width: 300px; pointer-events: none;
  background: var(--sh-surface); border: 1px solid var(--sh-rule); border-radius: var(--sh-radius-sm);
  box-shadow: var(--sh-shadow); padding: 10px 12px; font-size: 12.5px; line-height: 1.45; color: var(--sh-fog);
}
.hovercard .hc-d { font-weight: 700; margin-bottom: 2px; }
.hovercard .hc-p { color: var(--sh-muted); margin-bottom: 4px; }
.hovercard .hc-f { margin-top: 4px; }
.hovercard .hc-b { margin-top: 4px; color: #f9a8d4; font-weight: 500; }
.hovercard .hc-n { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--sh-rule); white-space: pre-wrap; }

/* Sidebar icons: the shell keeps only these on narrow screens. */
.sidebar-nav .ic { flex: none; }
/* On a narrow card the aim and limit marks sit close: put the aim label above the bar. */
.bar__mark.is-soft span { top: -19px; }
.tile .bar { margin-top: 26px; }

/* ---------- the day editor, simplified ---------- */
.panel { padding-top: 0; }
.panel-head {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin: 0 -18px 6px; padding: 14px 18px 10px; background: var(--sh-surface); border-bottom: 1px solid var(--sh-rule);
}
.panel-head .sub { margin: 2px 0 0; }
.psec { padding: 12px 0 4px; border-bottom: 1px solid var(--sh-rule); }
.psec:last-of-type { border-bottom: 0; }
.psec h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--sh-muted); margin: 0 0 10px; font-weight: 700; }
.psec textarea { width: 100%; }
.jlist { list-style: none; margin: 0 0 10px; padding: 0; }
.jlist li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--sh-rule); font-size: 13.5px; }
.jlist li:first-child { border-top: 0; }
.jform { background: var(--sh-surface-2); border-radius: var(--sh-radius-sm); padding: 10px 12px; margin-bottom: 10px; }
.jrow { display: flex; gap: 10px; flex-wrap: wrap; }
.jrow .field { flex: 1; min-width: 150px; }
details.more summary { cursor: pointer; font-size: 12.5px; color: var(--sh-muted); margin: 10px 0 6px; }
.panel .notes { border-top: 0; padding-top: 10px; margin-top: 0; }
/* 6 April: where the UK tax year turns over. */
.day.ty { box-shadow: inset 3px 0 0 var(--sh-accent); }
.day.ty.is-today { box-shadow: inset 3px 0 0 var(--sh-accent), 0 0 0 2px var(--sh-accent); }

/* the next-years table on the overview */
.sc-h { font-size: 12.5px; font-weight: 700; color: var(--sh-muted); margin: 16px 0 8px; }
.tbl.sc td, .tbl.sc th { white-space: normal; vertical-align: top; }
.tbl.sc td .faint { display: block; font-size: 11.5px; margin-top: 2px; }

/* scenarios */
.tbl.sc2 input[type="number"] { width: 84px; padding: 6px 8px; }
.tbl.sc2 input[type="checkbox"] { width: 18px; height: 18px; }
.tbl.sc2 td { vertical-align: middle; }
.tbl.sc2 tr.is-on td { background: color-mix(in srgb, var(--stop) 10%, transparent); }

/* overview tax strip, travel tabs */
.taxstrip { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 4px; }
.taxstrip > div { display: flex; flex-direction: column; gap: 4px; }
.taxstrip .pill { font-size: 13px; padding: 4px 10px; }
.taxstrip a.btn { margin-left: auto; text-decoration: none; }
.chips.tabs { margin: 0 0 14px; }
.card a:not(.btn) { color: var(--sh-accent-2); }

/* a day with a place and a country gets a white edge: filled in at a glance */
.day.has.is-sel { border-color: var(--sh-fog); }

/* calendar views */
.cal-tools { justify-content: space-between; }
.cal-nav .cal-title { margin-left: 6px; font-size: 14px; color: var(--sh-fog); }
.months.one { grid-template-columns: 1fr; }
.months.one .mgrid, .months.one .wk { gap: 5px; }
.months.one .day { aspect-ratio: auto; min-height: 92px; align-items: flex-start; text-align: left; padding: 6px 7px; font-size: 13px; }
.months.one .day .p { font-size: 11px; max-width: 100%; }
.months.one .day .t, .months.one .day .n { display: block; font-size: 10.5px; color: var(--sh-fog); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; margin-top: 3px; opacity: .9; }
.months.one .day .m { justify-content: flex-start; left: 7px; bottom: 5px; }
.dcards { display: grid; gap: 10px; }
.dcard { background: var(--sh-surface); border: 1px solid var(--sh-rule); border-left: 4px solid var(--c); border-radius: var(--sh-radius-sm); padding: 12px 14px; cursor: pointer; }
.dcard.is-today { box-shadow: 0 0 0 2px var(--sh-accent); }
.dcard__h { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 14px; color: var(--sh-fog); }
.dcard__h .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.dcard__b { margin-top: 6px; color: #f9a8d4; font-weight: 500; font-size: 13.5px; }
.dcard__n { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--sh-rule); font-size: 13.5px; white-space: pre-wrap; color: var(--sh-fog); }
.dcard .runs { margin-top: 8px; }
.panel .psec:first-of-type .notes { padding-top: 0; }
.panel #notes .nt:last-child { margin-bottom: 10px; }

/* phones: let list rows wrap instead of pushing the page sideways */
@media (max-width: 640px) {
  .runs li { flex-wrap: wrap; gap: 4px 10px; }
  .runs .when { min-width: 0; width: 100%; order: -1; }
  .card { padding: 14px 14px 12px; }
  .card .big { font-size: 32px; }
  .cal-tools { gap: 8px; }
  .months.one .day { min-height: 64px; padding: 4px; font-size: 11.5px; }
  .months.one .day .t, .months.one .day .n { display: none; }
  .taxstrip a.btn { margin-left: 0; }
}

.jrow .field.jt { flex: 0 1 120px; min-width: 104px; }

/* Date and time boxes: the native calendar and clock follow the theme, so the
   picker icon is visible on the dark page, and the whole box reads as clickable. */
:root:not([data-theme="light"]) input[type="date"], :root:not([data-theme="light"]) input[type="time"] { color-scheme: dark; }
:root[data-theme="light"] input[type="date"], :root[data-theme="light"] input[type="time"] { color-scheme: light; }
input[type="date"], input[type="time"] { cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .9; }

.panel .range-row { padding: 10px 0 2px; border-bottom: 1px solid var(--sh-rule); }
.panel .range-row .field { min-width: 130px; margin-bottom: 8px; }

/* availability: the next weeks, one square a day, coloured by work */
/* Every row as tall as the tallest, so the days are all one size. */
.avgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 6px; }
.avgrid .wkh { font-size: 11px; color: var(--sh-muted); text-align: center; padding-bottom: 2px; }
.avd { --a: var(--sh-rule); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 68px; padding: 6px 7px;
  border: 1px solid var(--sh-rule); border-top: 4px solid var(--a); border-radius: 8px; text-align: left; cursor: pointer;
  background: color-mix(in srgb, var(--a) 14%, transparent); color: var(--sh-fog); font: inherit; min-width: 0; }
.avd.remote { --a: #38bdf8; }
.avd.in_person { --a: var(--ok); }
.avd.away { --a: var(--stop); }
.avd.unset { background: transparent; }
.avd.is-past { opacity: .45; }
.avd.is-today { outline: 2px solid var(--sh-accent); outline-offset: 1px; }
.avd .d { font-size: 12px; font-weight: 600; }
.avd .a { font-size: 11.5px; line-height: 1.2; }
.avd.unset .a { color: var(--sh-muted); }
.avd .p { font-size: 11px; color: var(--sh-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) {
  .avgrid { gap: 3px; }
  .avd { min-height: 58px; padding: 4px; }
  .avd .a { font-size: 10px; }
  .avd .p { display: none; }
}

/* from Helen's Google calendars */
.calist { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--sh-rule); font-size: 13px; display: grid; gap: 4px; }
.hovercard .hc-c { margin-top: 3px; font-size: 12.5px; }
.day .cal-n { color: #a5b4fc; }
.avd .mt { font-size: 10.5px; color: #a5b4fc; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runs .xtra .is-err { color: var(--stop); }
.day .m b.mv { background: transparent; border: 1.5px dashed #f5b642; border-radius: 1px; width: 6px; height: 6px; }
.runs.diary li { align-items: flex-start; }
.diary .dy { display: grid; gap: 3px; flex: 1; min-width: 0; font-size: 13.5px; }
.diary .dy-b { color: #f9a8d4; font-weight: 500; }
.avd.is-sel { outline: 2px solid #fff; outline-offset: -2px; }
.avbar { position: sticky; bottom: 12px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--sh-rule); border-radius: 12px;
  background: var(--sh-surface); box-shadow: 0 8px 24px rgba(0,0,0,.35); z-index: 5; }
.avbar__h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.av-btn { border: 1px solid var(--a); background: color-mix(in srgb, var(--a) 22%, transparent); color: var(--sh-fog); }
.av-btn.remote { --a: #38bdf8; } .av-btn.in_person { --a: var(--ok); } .av-btn.away { --a: var(--stop); }

/* offline: a quiet sign while changes wait */
.netpill { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; z-index: 80; max-width: calc(100% - 32px);
  padding: 8px 14px; border-radius: 999px; font-size: 12.5px; background: var(--sh-surface); border: 1px solid var(--sh-rule);
  color: var(--sh-fog); box-shadow: 0 6px 20px rgba(0,0,0,.35); text-align: center; }
.netpill.is-off { border-color: #f5b642; }

/* notes: a list and the open note, like Apple Notes */
.nb { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 16px; min-height: calc(100vh - 140px); }
.nb-list, .nb-edit { background: var(--sh-surface); border: 1px solid var(--sh-rule); border-radius: 14px; min-width: 0; }
.nb-list { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.nb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nb-top h1 { font-size: 22px; margin: 0; }
#nb-search { width: 100%; }
.nb-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--sh-muted); margin: 10px 4px 4px; }
.nb-item { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 9px; border: 0; background: transparent; color: var(--sh-fog); cursor: pointer; font: inherit; }
.nb-item + .nb-item { border-top: 1px solid var(--sh-rule); border-radius: 0; }
.nb-item.is-on { background: color-mix(in srgb, var(--sh-accent) 22%, transparent); border-radius: 9px; }
.nb-item strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-item span { display: block; font-size: 12.5px; color: var(--sh-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.nb-item span b { font-weight: 500; color: var(--sh-fog); margin-right: 4px; }
.nb-folder { margin-top: auto; text-align: left; background: none; border: 0; color: var(--sh-muted); padding: 10px 4px 2px; cursor: pointer; font: inherit; font-size: 13px; }
.nb-edit { display: flex; flex-direction: column; padding: 10px 16px 16px; }
.nb-bar { display: flex; align-items: center; gap: 10px; min-height: 34px; }
.nb-bar .nb-back { display: none; }
.nb-date { text-align: center; font-size: 12px; margin: 6px 0 4px; }
#nb-text { flex: 1; width: 100%; min-height: 50vh; resize: none; border: 0; outline: none; background: transparent; color: var(--sh-fog);
  font-size: 16px; line-height: 1.6; font-family: inherit; padding: 4px 0; }
.nb-empty { margin: auto; }
/* Formatting, as Apple Notes */
.nb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 0 8px; border-bottom: 1px solid var(--sh-rule); }
.nb-tools select { width: auto; padding: 4px 8px; font-size: 13px; }
.nb-tools button { all: unset; cursor: pointer; min-width: 30px; height: 30px; padding: 0 6px; box-sizing: border-box; text-align: center; line-height: 30px; border-radius: 7px; font-size: 15px; color: var(--sh-fog); }
.nb-tools button:hover { background: color-mix(in srgb, var(--sh-fog) 10%, transparent); }
.nb-tools button.is-on { background: color-mix(in srgb, var(--sh-accent) 28%, transparent); }
.nb-sep { width: 1px; height: 20px; background: var(--sh-rule); margin: 0 4px; }
#nb-text.nb-rich { min-height: 50vh; outline: none; color: var(--sh-fog); font-size: 16px; line-height: 1.6; padding: 8px 0; overflow-wrap: anywhere; }
.nb-rich:empty::before { content: attr(data-placeholder); color: var(--sh-muted); }
.nb-rich h1 { font-size: 26px; font-weight: 800; margin: 4px 0 8px; line-height: 1.25; }
.nb-rich h2 { font-size: 20px; font-weight: 700; margin: 12px 0 6px; }
.nb-rich h3 { font-size: 17px; font-weight: 700; margin: 10px 0 4px; }
.nb-rich pre { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 14px; white-space: pre-wrap; margin: 4px 0; padding: 0; background: none; }
.nb-rich blockquote { margin: 6px 0; padding-left: 12px; border-left: 3px solid var(--sh-rule); color: var(--sh-muted); }
.nb-rich ul, .nb-rich ol { margin: 4px 0; padding-left: 26px; }
.nb-rich ul.dashed { list-style: none; }
.nb-rich ul.dashed > li::before { content: "\2013"; position: absolute; margin-left: -18px; }
.nb-rich ul.checklist { list-style: none; padding-left: 30px; }
.nb-rich ul.checklist > li { position: relative; margin: 3px 0; }
.nb-rich ul.checklist > li::before { content: ""; position: absolute; left: -28px; top: 4px; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--sh-muted); cursor: pointer; box-sizing: border-box; }
.nb-rich ul.checklist > li[data-done="1"]::before { background: #f5b642; border-color: #f5b642; }
.nb-rich ul.checklist > li[data-done="1"]::after { content: "\2713"; position: absolute; left: -24px; top: 1px; font-size: 12px; font-weight: 800; color: #111; pointer-events: none; }
.nb-rich ul.checklist > li[data-done="1"] { color: var(--sh-muted); }
/* Reminders */
.nb-remind { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--sh-rule); border-radius: 10px; }
.nb-remind .chips { margin-bottom: 8px; }
.nb-remind input[type="datetime-local"] { width: auto; }
.nb-rem-tag { display: block; font-size: 12px; color: #f5b642; margin-top: 2px; }
.nb-rem-line { color: #f5b642; }
#nb-remind.is-on { border-color: #f5b642; color: #f5b642; }
@media (max-width: 760px) {
  .nb { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .nb.has-open .nb-list { display: none; }
  .nb:not(.has-open) .nb-edit { display: none; }
  .nb-bar .nb-back { display: inline-flex; }
  #nb-text { min-height: 60vh; }
  .nb-tools { position: sticky; top: env(safe-area-inset-top, 0px); background: var(--sh-surface); z-index: 2; }
}

/* tax: which country a card is about */
.ctag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: 6px; margin-right: 6px;
  vertical-align: 1px; color: var(--sh-fog); border: 1px solid var(--sh-rule); background: var(--sh-surface-2); }
.taxtabs { margin: 18px 0 10px; }
.country-band { display: flex; gap: 10px 14px; flex-wrap: wrap; align-items: baseline; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px;
  border: 1px solid var(--sh-rule); background: var(--sh-surface); font-size: 13.5px; }
.country-band strong { font-size: 16px; }
.esr { padding: 10px 0; border-top: 1px solid var(--sh-rule); }
.esr:first-of-type { border-top: 0; }
.esr__h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.esr p { margin: 4px 0; font-size: 13.5px; }

/* calendar: a black square, white writing, and a small flag for the country */
.day.has-flag { background: #000; border-color: rgba(255,255,255,.14); color: #fff; }
.day.has-flag.has { border-color: rgba(255,255,255,.55); }
.day .fbg { position: absolute; right: 3px; bottom: 2px; z-index: 1; pointer-events: none; font-size: 12px; line-height: 1; }
.months.one .day .fbg { right: 6px; top: 6px; bottom: auto; font-size: 17px; }
.day > span:not(.fbg):not(.av):not(.tvi) { position: relative; z-index: 1; }
.day.has-flag .p, .day.has-flag .t, .day.has-flag .n { color: rgba(255,255,255,.82); }
.calcounts { display: flex; gap: 8px; margin: 2px 0 14px; }
.calcounts .cc { font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1.5px solid var(--sh-rule); background: var(--sh-surface); }
.calcounts .cc b { font-weight: 700; }
/* Each in its flag: the UK's red, white and blue; Spain's red, gold and red. */
.calcounts .cc-uk { border-color: transparent;
  background: linear-gradient(var(--sh-surface), var(--sh-surface)) padding-box,
              linear-gradient(90deg, #012169 0%, #3a5bd9 30%, #ffffff 50%, #e0334a 70%, #c8102e 100%) border-box; }
.calcounts .cc-es { border-color: transparent;
  background: linear-gradient(var(--sh-surface), var(--sh-surface)) padding-box,
              linear-gradient(90deg, #aa151b 0%, #c60b1e 22%, #f1bf00 40%, #f1bf00 60%, #c60b1e 78%, #aa151b 100%) border-box; }
.calcounts .cc.is-near b { color: var(--warn); }
.calcounts .cc.is-over { border-color: var(--stop); background: var(--sh-surface); color: var(--stop); }
.day .mvdot { position: absolute; left: 4px; bottom: 4px; z-index: 2; width: 7px; height: 7px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 1.5px #000; }
.months.one .day .mvdot { left: auto; right: 7px; bottom: 7px; width: 9px; height: 9px; }
.day .tvi { position: absolute; left: 3px; bottom: 2px; z-index: 2; font-size: 11px; line-height: 1; pointer-events: none; }
.months.one .day .tvi { left: auto; right: 6px; bottom: 6px; font-size: 15px; }

/* side panel: one line per section, opened by a tap */
.ps { border-bottom: 1px solid var(--sh-rule); }
.ps > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 13px 2px; cursor: pointer; min-height: 48px; }
.ps > summary::-webkit-details-marker { display: none; }
.ps > summary::after { content: "\203A"; margin-left: auto; color: var(--sh-muted); font-size: 20px; line-height: 1; transition: transform .15s; }
.ps[open] > summary::after { transform: rotate(90deg); }
.ps-ic { font-size: 19px; width: 26px; text-align: center; flex: none; }
.qmodes { display: flex; gap: 2px; margin-left: auto; flex: none; }
.qm { background: none; border: 1px solid transparent; border-radius: 8px; font-size: 17px; line-height: 1; padding: 6px 5px; cursor: pointer; }
.qm:hover, .qm:focus-visible { border-color: var(--sh-rule); background: var(--sh-surface-2); }
.ps-t { min-width: 0; font-size: 14.5px; color: var(--sh-fog); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The travel line wraps, so a Fast Track badge is never cut off. */
#sum-travel { white-space: normal; line-height: 1.5; }
.ps-b { padding: 0 2px 14px; }
.panel .impact { margin-top: 14px; }

/* Work: a calendar of availability */
.wmonth h3 { margin: 6px 0 6px; }
.avd.is-pad { visibility: hidden; }
.avd .d { font-size: 13px; }
.avd .mt { font-size: 10.5px; color: #a5b4fc; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wyear { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 18px; }
.wyear .avgrid { gap: 3px; }
.avd.is-small { min-height: 0; aspect-ratio: 1 / 1; padding: 3px; align-items: center; justify-content: center; border-top-width: 1px; }
.avd.is-small .d { font-size: 11px; font-weight: 500; }
.wcards { display: grid; gap: 10px; }
.wcard { padding: 12px 14px; border: 1px solid var(--sh-rule); border-radius: 12px; background: var(--sh-surface); cursor: pointer; }
.wcard.is-today { border-color: var(--sh-accent); }
.wcard__h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.wcard__p { margin-top: 4px; font-size: 14px; }
.ro-h { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--sh-muted); margin: 16px 0 6px; }
.pvbar { position: fixed; top: 0; left: 0; right: 0; z-index: 90; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
  padding: 8px 16px; background: #f5b642; color: #111; font-size: 13.5px; font-weight: 600; }
.views3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
/* sharing: one row a person, one tickbox a permission */
.perm-tbl { min-width: 640px; }
.perm-tbl th.pc, .perm-tbl td.pc { text-align: center; width: 72px; }
.perm-tbl th.pc { cursor: help; }
.perm-tbl td { vertical-align: middle; }
.perm-tbl input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--sh-accent); cursor: pointer; }
.perm-tbl input[type="checkbox"]:disabled { cursor: default; opacity: .55; }
.perm-tbl .perm-name, .perm-new input:not([type]), .perm-new input[type="email"] { width: 100%; max-width: 260px; display: block; }
.perm-tbl .perm-name { font-weight: 600; background: transparent; border-color: transparent; padding-left: 0; }
.perm-tbl .perm-name:hover, .perm-tbl .perm-name:focus { border-color: var(--sh-rule); padding-left: 8px; }
.perm-sub { display: block; font-size: 12.5px; margin-top: 2px; }
.perm-act { white-space: nowrap; text-align: right; }
.perm-act .btn + .btn { margin-left: 6px; }
.perm-new td { border-top: 2px solid var(--sh-rule); padding-top: 12px; }
.perm-new input[type="email"] { margin-top: 6px; }
.perm-key { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.perm-key dt { font-weight: 700; }
.perm-key dd { margin: 0; color: var(--sh-muted); }

/* report: printable for the accountant */
.report { background: var(--sh-surface); border: 1px solid var(--sh-rule); border-radius: 14px; padding: 18px 20px; }
.report h2 { margin: 0 0 4px; }
.report h3 { margin: 22px 0 8px; font-size: 16px; }
.report h4 { margin: 14px 0 6px; font-size: 13.5px; color: var(--sh-muted); }
.report section { break-inside: avoid-page; }
.rt { width: 100%; border-collapse: collapse; font-size: 13px; }
.rt th, .rt td { text-align: left; padding: 5px 8px; border-top: 1px solid var(--sh-rule); vertical-align: top; }
.rt th { width: 38%; font-weight: 600; }
.rt-list th { width: auto; }
.rp-days .rt { font-size: 11.5px; }
@media print {
  .sidebar, .topbar, header.sh-header, .noprint, .page-head, .lede, #netpill, .pvbar, .shell-header, nav { display: none !important; }
  .layout { display: block !important; }
  .report { border: 0; padding: 0; background: #fff; color: #000; }
  .report * { color: #000 !important; }
  .rt th, .rt td { border-top: 1px solid #ccc; }
}
.runs .fl1 { width: 20px; flex: none; text-align: center; font-size: 15px; }
.notes-up li { cursor: pointer; border-radius: 8px; }
.notes-up li:hover { background: var(--sh-surface-2); }
.day .lk { font-style: normal; font-size: 9px; vertical-align: 1px; }
.months.one .day .lk { font-size: 11px; }
.lockbtn.is-on { border-color: #f5b642; color: #f5b642; }
.lock-alert { margin: 10px 0; }
.lock-alert p { margin: 6px 0 10px; font-size: 13.5px; }

/* overview: one heading style, and the table of the weeks ahead */
.ovh { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ovh h2 { margin: 0; font-size: 17px; color: var(--sh-fog); text-transform: none; letter-spacing: 0; }
.ovh-ic { font-size: 20px; line-height: 1; }
.ovh-sub { margin-left: auto; font-size: 12.5px; }
.ovh + .calcounts { margin-top: -2px; }
.ovtable { margin: 16px 0; }
.otbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.otbl th { text-align: left; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--sh-muted); font-weight: 600; padding: 0 10px 8px; }
.otbl td { padding: 10px; border-top: 1px solid var(--sh-rule); vertical-align: top; }
.otbl tbody tr { cursor: pointer; }
.otbl tbody tr:hover td { background: var(--sh-surface-2); }
.otbl .ot-f { width: 28px; font-size: 18px; padding-right: 0; }
.otbl .ot-d { white-space: nowrap; font-family: var(--sh-mono); font-size: 12.5px; color: var(--sh-muted); }
.otbl .ot-p { font-weight: 600; }
.otbl .ot-n, .otbl .ot-y { color: var(--sh-fog); font-size: 12.5px; }
@media (max-width: 760px) {
  .otbl thead { display: none; }
  .otbl tr { display: grid; grid-template-columns: 28px 1fr; column-gap: 8px; padding: 10px 0; border-top: 1px solid var(--sh-rule); }
  .otbl td { border: 0; padding: 1px 0; }
  .otbl .ot-f { grid-row: span 5; }
  .otbl .ot-c, .otbl .ot-p { display: inline; }
  .otbl td:empty { display: none; }
}

/* breathing room inside cards: heading, the big number, the text, a callout */
.card h2 + .big, .card .rule + .big, .card .calcounts + .big { margin-top: 14px; }
.card .big { margin-bottom: 10px; }
.card p + .note-block, .card .big + .note-block { margin-top: 14px; }
.card .note-block + .sc-h, .card .note-block + p { margin-top: 18px; }
.card .sc-h { margin-top: 22px; }

/* tax: even spacing between every block */
#content > .grid2, #content > .card, #content > .country-band, #content > #scenarios > .card, #content > .chips { margin-bottom: 16px; }
#content > .grid2 { gap: 16px; }
.sec-title { margin: 26px 0 10px; }
.sec-title .ovh h2 { font-size: 19px; }
.card .ovh .ovh-sub { text-align: right; }
.tile .rule { margin: 0 0 4px; font-size: 13px; color: var(--sh-muted); }

/* top bar: view the site as someone else */
.viewas { display: flex; align-items: center; gap: 8px; margin-right: 10px; font-size: 13px; color: var(--sh-muted); }
.viewas select { width: auto; padding: 6px 28px 6px 10px; font-size: 13.5px; border-radius: 999px; }
.viewas.is-on select { border-color: #f5b642; color: #f5b642; }
@media (max-width: 760px) { .viewas__lab { display: none; } .viewas { margin-right: 6px; } .viewas select { padding: 5px 24px 5px 8px; font-size: 13px; } }

/* travel: one list, in date order */
.tl .tl-row { flex-wrap: wrap; }
.tl .tl-acts { margin-left: auto; gap: 6px; }
.tl .is-past { opacity: .6; }
.tl .tl-pending { background: color-mix(in srgb, #f5b642 8%, transparent); border-radius: 8px; }
.tl .tl-from { flex-basis: 100%; font-size: 12px; }
.tl-today { display: flex; align-items: center; gap: 10px; color: var(--sh-accent); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; scroll-margin-top: 90px; }
.tl-today::after { content: ""; flex: 1; height: 1px; background: var(--sh-accent); opacity: .5; }
.tl .mvdot-i, .ps-t .mvdot-i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; margin-right: 8px; vertical-align: 1px; }
.cal-more { text-align: center; padding: 18px; font-size: 12.5px; }

/* Homes: arrivals, the houses, people (sql/0019). */
.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 16px 0 8px; }
.arr-where .sw { display: none; }
.ov-grid .card { margin: 0; }
.sec-h { font-size: 15px; color: var(--sh-fog); margin: 22px 0 10px; text-transform: none; letter-spacing: 0; }
.arr { margin-bottom: 14px; }
.arr.is-here { border-color: var(--sh-accent); }
.arr-when { margin: -4px 0 8px; font-size: 14px; }
.arr-travel { margin-bottom: 8px; }
.arr-needs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px 16px; }
.arr-needs li { padding: 6px 0; font-size: 14px; }
.arr-needs .check { margin: 0; }
.need-edit { list-style: none; margin: 0 0 10px; padding: 0; }
.need-edit li { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.need-edit input { flex: 1; }
.task-who { font-size: 13px; color: var(--sh-muted); margin: 14px 0 4px; text-transform: none; letter-spacing: 0; }
.task-who:first-of-type { margin-top: 0; }
.tasks { margin: 0; padding-left: 18px; }
.tasks li { padding: 4px 0; font-size: 14px; }
.tasks li.is-click { cursor: pointer; }
.tasks li.is-click:hover { color: var(--sh-accent); }
.sup-tbl td:first-child { white-space: nowrap; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid var(--sh-rule); border-radius: var(--sh-radius-sm); background: var(--sh-surface); font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.pcard strong { font-size: 14.5px; color: var(--sh-fog); }
.pcard.is-click { cursor: pointer; }
.pcard.is-click:hover { border-color: var(--sh-accent); }

/* Staying and diary rows on the day panel. */
.stay-no { color: var(--stop); }
.dg { padding: 8px 0; border-top: 1px solid var(--sh-rule); display: flex; flex-direction: column; gap: 4px; }
.dg:first-child { border-top: 0; }
.dg-t { flex: 1; min-width: 0; }
.dg-m { font-size: 12px; }

/* Requests to the house manager. */
.req { padding: 10px 0; border-top: 1px solid var(--sh-rule); }
.req:first-of-type { border-top: 0; }
.req.is-done { opacity: .6; }
.req-t { margin: 4px 0 8px; font-size: 13.5px; color: var(--sh-fog); }

/* Year: small months, as Apple Calendar's year view */
.yr-h { text-align: center; font-size: 28px; font-weight: 800; margin: 18px 0 6px; }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 22px 28px; margin-bottom: 24px; }
@media (max-width: 560px) { .minis { grid-template-columns: 1fr 1fr; gap: 18px 14px; } }
.mini { scroll-margin-top: 80px; }
.mini-name { all: unset; cursor: pointer; font-size: 26px; font-weight: 800; letter-spacing: -.3px; margin: 0 0 8px; display: inline-block; }
.mini-name:hover { color: var(--sh-accent); }
.mini-days { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.md { all: unset; position: relative; cursor: pointer; text-align: center; font-weight: 700; font-size: 15px; line-height: 30px; height: 34px; border-radius: 8px; }
.md::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 16px; height: 3px; border-radius: 2px; transform: translateX(-50%); background: var(--c, transparent); }
@media (max-width: 560px) { .md { font-size: 12.5px; line-height: 22px; height: 26px; } .md::after { width: 12px; bottom: 2px; } .mini-name { font-size: 20px; } }
.md.is-empty { color: var(--sh-muted); }
.md.is-past { opacity: .55; }
.md:hover { background: color-mix(in srgb, var(--sh-accent) 22%, transparent); }
.md.is-today { color: #fff; opacity: 1; }
.md.is-today::before { content: ""; position: absolute; left: 50%; top: 0; width: 30px; height: 30px; border-radius: 50%; background: #e5484d; transform: translateX(-50%); z-index: -1; }
.mini-days { position: relative; z-index: 0; }
.md.is-sel { background: color-mix(in srgb, var(--sh-accent) 35%, transparent); opacity: 1; }
.ft-tag { color: #f5b642; font-weight: 600; }
.ft-badge { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; padding: 1px 7px; border-radius: 999px;
  color: #111; background: #f5b642; vertical-align: 1px; }
