/* Calendrier du Domaine du Grand Calme. Spruce, lake and birch: calm, high contrast, big targets. */
:root {
  --bg: #F3F5F0;
  --card: #FFFFFF;
  --line: #DDE3DA;
  --line-soft: #E6EAE3;
  --grid: #EDF0EA;
  --ink: #18261E;
  --ink-2: #3B4A41;
  --muted: #55635A;
  --forest: #1F3A2D;
  --forest-deep: #0F2219;
  --green: #2F5D46;
  --green-soft: #E3EDE5;
  --chip: #E6EBE3;
  --field: #C9D2C6;
  --amber-bg: #FBF3E2;
  --amber-ring: #F4DFB0;
  --amber-ink: #6B4205;
  --red-bg: #FBE9E5;
  --red-ring: #F1C4BA;
  --red-ink: #7A2414;
  --new: #F2B33D;
  --name-col: 172px;
  --head: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(24, 38, 30, 0.06), 0 8px 24px rgba(24, 38, 30, 0.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--forest); }
a:hover { color: var(--forest-deep); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #4F8A6A; outline-offset: 2px; }
h1, h2, h3 { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- shell ---- */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1360px; margin: 0 auto; padding: 14px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--forest); color: var(--bg); display: flex; align-items: center; justify-content: center; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-small { font-size: 13px; color: var(--muted); font-weight: 600; }
.brand-big { font-family: var(--head); font-size: 21px; font-weight: 600; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 15px; text-decoration: none; }
.nav a:hover { background: var(--bg); }
.nav a[aria-current="page"] { background: var(--green-soft); color: var(--forest); font-weight: 700; }
.tabbar { display: none; }

/* demo only: what is simulated, and buttons to make things happen */
.demo-bar { background: var(--amber-bg); border-bottom: 1px solid var(--amber-ring); color: var(--amber-ink); }
.demo-in { max-width: 1360px; margin: 0 auto; padding: 10px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.demo-text { margin: 0; flex: 1 1 380px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.demo-text b { font-family: var(--head); font-size: 15px; letter-spacing: 0.02em; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-actions .btn { border-color: var(--amber-ring); color: var(--amber-ink); min-height: 40px; }
.demo-actions .btn:hover { background: #FFFFFF; }
.demo-actions .btn[disabled] { background: var(--card); opacity: 0.6; }

main.page { max-width: 1360px; margin: 0 auto; padding: 32px 32px 72px; display: flex; flex-direction: column; gap: 24px; }

/* ---- buttons, chips, fields ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--forest); color: #FFFFFF; font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--forest-deep); color: #FFFFFF; }
.btn[disabled] { background: #A9B5AC; cursor: not-allowed; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1px solid var(--field); font-weight: 600; }
.btn-ghost:hover { background: var(--bg); color: var(--ink); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-danger { background: var(--card); color: var(--red-ink); border: 1px solid var(--red-ring); font-weight: 700; }
.btn-danger:hover { background: var(--red-bg); color: var(--red-ink); }
.round { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--field); background: var(--card); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.round:hover { background: var(--bg); }
.seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--chip); }
.seg button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 15px; font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 1px 2px rgba(24, 38, 30, 0.12); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--field); background: var(--card); color: var(--ink); font-size: 15px; font-weight: 600; }
.chip:hover { border-color: var(--green); }
.chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #FFFFFF; }
.chip .tick { display: none; }
.chip[aria-pressed="true"] .tick { display: inline; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label { font-weight: 700; font-size: 15px; }
.hint { font-size: 14px; color: var(--muted); font-weight: 500; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--field); border-radius: 12px; background: var(--card); font-size: 16px; }
.input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(62, 124, 90, 0.18); }
.input[readonly] { background: var(--bg); color: var(--ink-2); }
select.input { appearance: auto; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.error-text { color: var(--red-ink); font-weight: 600; font-size: 15px; margin: 0; }
.muted { color: var(--muted); }

/* ---- cards ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.h1 { font-family: var(--head); font-size: 46px; line-height: 1.05; font-weight: 600; letter-spacing: -0.01em; }
.h2 { font-family: var(--head); font-size: 26px; line-height: 1.15; font-weight: 600; }
.h2-small { font-family: var(--head); font-size: 22px; font-weight: 600; }
.h3 { font-size: 16px; font-weight: 700; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 760px; margin: 8px 0 0; }

/* ---- calendar page ---- */
.cal { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "head head head" "banner banner banner" "timeline timeline timeline" "details today recent"; align-items: start; }
.cal-head { grid-area: head; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cal-head .eyebrow { margin-bottom: 6px; }
.cal-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.banner { grid-area: banner; }
.timeline-card { grid-area: timeline; padding: 22px 24px 20px; }
.details { grid-area: details; align-self: stretch; }
.today { grid-area: today; align-self: stretch; }
.recent { grid-area: recent; align-self: stretch; }

.status { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 18px 24px; }
.status-main { display: flex; align-items: center; gap: 14px; flex: 1 1 420px; }
.status-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.status-title { margin: 0; font-weight: 700; font-size: 17px; }
.status-sub { margin: 0; color: var(--muted); font-size: 15px; }
.status.warn { background: var(--amber-bg); border-color: var(--amber-ring); }
.status.warn .status-icon { background: var(--amber-ring); color: var(--amber-ink); }
.status.bad { background: var(--red-bg); border-color: var(--red-ring); }
.status.bad .status-icon { background: var(--red-ring); color: var(--red-ink); }
.status-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.status-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 15px; }
.linkish { background: none; border: 0; padding: 0; color: var(--forest); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--bg); font-size: 14px; }
.status.warn .pill, .status.bad .pill { background: rgba(255, 255, 255, 0.7); }
.pill-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pill .muted { white-space: nowrap; }

.tl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-bottom: 14px; }
.tl-top .h2-small { flex: 1 1 auto; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 8px; }
.swatch { width: 16px; height: 16px; border-radius: 5px; flex: none; }
.tl-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.tl { position: relative; }
.tl-row { display: grid; height: 66px; border-top: 1px solid var(--line-soft); }
.tl-row.tl-header { height: 62px; border-top: 0; }
.tl-name { grid-row: 1; grid-column: 1 / 2; display: flex; align-items: center; gap: 10px; padding-right: 12px; min-width: 0; position: sticky; left: 0; z-index: 3; background: var(--card); }
.tl-header .tl-name { align-items: flex-end; padding-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.unit-icon { width: 38px; height: 38px; border-radius: 11px; background: #EEF2EC; color: var(--green); display: flex; align-items: center; justify-content: center; flex: none; }
.unit-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.unit-text b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit-text span { font-size: 13px; color: var(--muted); }
.tl-day { grid-row: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding-bottom: 8px; border-radius: 12px 12px 0 0; }
.tl-day .dow { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.tl-day .num { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.tl-day.weekend { background: var(--bg); }
.tl-day.is-today { background: var(--green-soft); }
.tl-day.is-today .num { background: var(--forest); color: #FFFFFF; }
.tl-day .mon { font-size: 11px; font-weight: 800; color: var(--green); text-transform: uppercase; }
.tl-cell { grid-row: 1; border-left: 1px solid var(--grid); }
.tl-cell.weekend { background: #F8FAF6; }
.tl-cell.is-today { background: #F0F6F1; }
.bar { grid-row: 1; align-self: center; position: relative; z-index: 1; height: 44px; margin: 0 3px; min-width: 0; overflow: hidden; border: 0; border-radius: 12px; padding: 0 10px 0 7px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; text-align: left; }
.bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.bar[aria-pressed="true"] { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--ink); z-index: 2; }
.bar:hover { filter: brightness(0.97); }
.bar-label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.badge { flex: none; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.new-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--new); box-shadow: 0 0 0 2px #FFFFFF; }
.conflict-mark { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; color: var(--red-ink); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; }
.tl-foot { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.empty-units { padding: 28px 0 8px; color: var(--muted); }

.src-airbnb { background: #E8A48A; color: #3F1A0E; }
.src-airbnb .badge { background: #3F1A0E; color: #F6D5C8; }
.src-hipcamp { background: #3E7C5A; color: #FFFFFF; }
.src-hipcamp .badge { background: #FFFFFF; color: #2C5E42; }
.src-booking { background: #1F4E79; color: #FFFFFF; }
.src-booking .badge { background: #FFFFFF; color: #1F4E79; }
.src-vrbo { background: #2B6F8C; color: #FFFFFF; }
.src-vrbo .badge { background: #FFFFFF; color: #2B6F8C; }
.src-direct { background: #F1D58A; color: #3D3010; }
.src-direct .badge { background: #3D3010; color: #F6E3AE; }
.src-block { background: repeating-linear-gradient(135deg, #E9ECE6 0 7px, #D8DED5 7px 14px); color: #2E3A33; }
.src-block .badge { background: #FFFFFF; color: #2E3A33; }
.bar.has-conflict { outline: 2px dashed var(--red-ink); outline-offset: -2px; }

/* details, today, recent */
.sel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sel-badge { flex: none; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 22px; }
.facts div { background: var(--bg); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.synclist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.synclist li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.synclist .ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--green-soft); color: var(--green); }
.synclist li.pending { background: var(--amber-bg); }
.synclist li.pending .ico { background: var(--amber-ring); color: var(--amber-ink); }
.synclist li.todo .ico { background: var(--chip); color: var(--muted); }
.synclist .txt { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.synclist .txt b { font-weight: 700; }
.synclist .txt span { font-size: 14px; color: #4A5850; }
.sel-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.note-box { margin: -8px 0 20px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--field); font-size: 15px; }
.placeholder { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--muted); }
.placeholder .h2 { color: var(--ink); }

.people { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.person { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 0; border-radius: 14px; background: var(--bg); text-align: left; }
.person:hover { background: var(--green-soft); }
.dot-badge { flex: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.person-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.person-text span { font-size: 14px; color: var(--muted); }
.none { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { border-bottom: 1px solid var(--line-soft); }
.feed li:last-child { border-bottom: 0; }
.feed-item { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border: 0; background: none; text-align: left; }
button.feed-item:hover .feed-title { text-decoration: underline; text-underline-offset: 3px; }
.feed-text { flex: 1 1 auto; display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.feed-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.feed-text > span { font-size: 14px; color: var(--muted); }
.feed-when { flex: none; font-size: 13px; color: var(--muted); }
.tag-new { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: #FBEBC8; color: var(--amber-ink); }
.ico-block { background: #FFFFFF; color: #2E3A33; border: 1.5px solid var(--field); }
.ico-alert { background: var(--red-ring); color: var(--red-ink); }
.ico-ok { background: var(--green-soft); color: var(--green); }

/* onboarding */
.onboard { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; background: var(--forest); color: #E7EFE9; border: 0; }
.onboard .h2 { color: #FFFFFF; }
.onboard p { margin: 4px 0 0; color: #C9D8CE; }
.onboard .btn { background: #F3F5F0; color: var(--forest); }
.onboard .btn:hover { background: #FFFFFF; color: var(--forest-deep); }

/* ---- block page ---- */
.block-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.steps { display: flex; flex-direction: column; gap: 28px; }
.step-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.step-num { font-family: var(--head); color: var(--green); }
.month { border: 1px solid var(--line); border-radius: 16px; padding: 14px; max-width: 520px; }
.month-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.month-name { font-family: var(--head); font-size: 20px; font-weight: 600; text-transform: capitalize; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month-dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.mday { position: relative; height: 50px; border: 0; border-radius: 12px; background: transparent; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.mday:hover:not([disabled]) { background: var(--green-soft); }
.mday[disabled] { color: #A8B2AB; cursor: default; }
.mday.is-today { box-shadow: inset 0 0 0 1.5px var(--green); }
.mday.in-range { background: var(--green-soft); color: var(--forest); border-radius: 0; }
.mday.range-start { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.mday.range-end { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }
.mday.edge { background: var(--forest); color: #FFFFFF; }
.mday .occ { position: absolute; bottom: 6px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #C0682F; }
.mday.edge .occ { background: #F6D5C8; }
.range-text { margin: 12px 0 0; font-size: 15px; font-weight: 600; }
.summary { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
.summary-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.summary-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.summary-list svg { flex: none; margin-top: 2px; color: var(--green); }
.callout { border-radius: 14px; padding: 14px 16px; font-size: 15px; }
.callout b { display: block; margin-bottom: 4px; }
.callout ul { margin: 6px 0 6px; padding-left: 18px; }
.callout.ok { background: var(--green-soft); color: var(--forest); }
.callout.warn { background: var(--amber-bg); color: var(--amber-ink); border: 1px solid var(--amber-ring); }
.callout.bad { background: var(--red-bg); color: var(--red-ink); border: 1px solid var(--red-ring); }
.summary-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ---- platforms page ---- */
.plat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.plat { display: flex; flex-direction: column; gap: 14px; }
.plat.current { box-shadow: 0 0 0 2px var(--forest); }
.plat-head { display: flex; align-items: center; gap: 12px; }
.plat-badge { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; flex: none; }
.state-pill { margin-left: auto; font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); white-space: nowrap; }
.state-pill.part { background: var(--amber-bg); color: var(--amber-ink); }
.state-pill.none { background: var(--chip); color: var(--ink-2); }
.state-pill.err { background: var(--red-bg); color: var(--red-ink); }
.plat-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.plat-lines li { display: flex; gap: 10px; align-items: flex-start; }
.plat-lines svg { flex: none; margin-top: 3px; color: var(--muted); }
.plat .btn { align-self: flex-start; margin-top: auto; }
.add-plat { border: 2px dashed var(--field); background: transparent; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.links-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.link-rows { display: flex; flex-direction: column; gap: 14px; }
.link-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 1fr); gap: 16px 20px; padding: 18px; border-radius: 16px; background: var(--bg); align-items: start; }
.link-unit { display: flex; align-items: center; gap: 10px; min-width: 0; }
.link-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.link-col .label { font-size: 14px; }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { min-width: 0; font-size: 14px; font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.link-state { grid-column: 2 / 4; font-size: 14px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.link-state.ok { color: var(--green); font-weight: 600; }
.link-state.err { color: var(--red-ink); font-weight: 600; }
.state-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.guide { background: var(--forest); color: #E7EFE9; border: 0; }
.guide .h2 { color: #FFFFFF; }
.guide ol { margin: 16px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: step; }
.guide li { background: rgba(255, 255, 255, 0.07); border-radius: 16px; padding: 18px; counter-increment: step; }
.guide li::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #F3F5F0; color: var(--forest); font-weight: 800; margin-bottom: 10px; }
.guide li b { color: #FFFFFF; display: block; margin-bottom: 4px; }
.guide p.note { margin: 16px 0 0; color: #C9D8CE; font-size: 15px; }

/* ---- settings ---- */
.settings { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-col { display: flex; flex-direction: column; gap: 24px; }
.unit-list { list-style: none; margin: 16px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.unit-edit { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px; border-radius: 14px; background: var(--bg); }
.unit-edit .tools { display: flex; gap: 6px; }
.icon-pick { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--field); background: var(--card); color: var(--green); display: inline-flex; align-items: center; justify-content: center; }
.icon-pick:hover, .icon-pick[aria-expanded="true"] { border-color: var(--green); background: var(--green-soft); }
.icon-menu { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.icon-opt { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border: 1.5px solid transparent; border-radius: 10px; background: transparent; color: var(--ink-2); font-size: 13px; font-weight: 600; line-height: 1.2; text-align: center; }
.icon-opt svg { color: var(--green); }
.icon-opt:hover { background: var(--bg); }
.icon-opt[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--forest); }
.field .unit-list { margin: 6px 0 4px; }
.add-unit { align-self: flex-start; }
.unit-add { margin-top: 4px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--field); background: var(--card); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--green-soft); }
.icon-btn.danger:hover { background: var(--red-bg); color: var(--red-ink); }
.icon-btn[disabled] { opacity: 0.4; cursor: default; }
.form-stack { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }

/* ---- how it works ---- */
.flow { display: grid; grid-template-columns: 1fr 60px 1.1fr 60px 1fr; align-items: center; gap: 0; padding: 32px; }
.flow-col { display: flex; flex-direction: column; gap: 12px; }
.flow-col .eyebrow { margin-bottom: 4px; }
.flow-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--bg); font-weight: 700; }
.flow-card span.muted { font-weight: 500; font-size: 14px; display: block; }
.flow-hub { background: var(--forest); color: #FFFFFF; border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 8px; text-align: center; align-items: center; }
.flow-hub .h2 { color: #FFFFFF; }
.flow-hub p { margin: 0; color: #C9D8CE; }
.flow-you { margin-top: 14px; background: #F1D58A; color: #3D3010; border-radius: 16px; padding: 12px 16px; font-weight: 700; text-align: center; }
.flow-arrow { display: flex; align-items: center; justify-content: center; color: #9AA89F; }
.flow-closed { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; border: 1.5px dashed var(--field); font-weight: 700; }
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.promise { display: flex; flex-direction: column; gap: 10px; }
.promise-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; }
.promise p { margin: 0; color: var(--ink-2); }
.limits { background: #FFFDF6; border-color: #EADFC4; }
.limits ul { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }

/* ---- login / setup ---- */
.gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px 160px; position: relative; overflow: hidden; }
.gate-card { position: relative; z-index: 1; width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 34px 32px 30px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px; }
.gate-card.wide { max-width: 560px; }
.gate .brand { flex: none; }
.gate-scene { position: absolute; left: 0; right: 0; bottom: 0; height: 220px; color: #CFDACF; pointer-events: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---- toast ---- */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50; max-width: min(560px, calc(100vw - 32px));
  background: var(--forest); color: #FFFFFF; padding: 14px 20px; border-radius: 16px; font-weight: 600; box-shadow: 0 10px 30px rgba(15, 34, 25, 0.25); transition: opacity 0.2s, transform 0.2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--red-ink); }

.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } #toast { transition: none; } }

/* ---- smaller screens ---- */
@media (max-width: 1100px) {
  .cal { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head head" "banner banner" "timeline timeline" "details details" "today recent"; }
  .flow { grid-template-columns: 1fr; gap: 12px; }
  .flow-arrow { transform: rotate(90deg); height: 40px; }
  .promises { grid-template-columns: 1fr; }
  .settings { grid-template-columns: 1fr; }
  .link-row { grid-template-columns: minmax(0, 1fr); }
  .link-state { grid-column: auto; }
}
@media (max-width: 1000px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .topbar .nav, .topbar .btn { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; min-height: 56px; border-radius: 14px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
  .tabbar a[aria-current="page"] { color: var(--forest); background: var(--green-soft); }
  #toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
}
@media (max-width: 860px) {
  .block-grid { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 720px) {
  :root { --name-col: 120px; }
  .topbar-in { padding: 10px 16px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-big { font-size: 19px; }
  main.page { padding: 20px 16px 40px; gap: 18px; }
  .demo-in { padding: 10px 16px; }
  .demo-actions { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .demo-actions .btn { flex: none; }
  .card { padding: 18px; border-radius: 18px; }
  .h1 { font-size: 30px; }
  .h2 { font-size: 23px; }
  .cal-tools .seg { display: none; }
  .status-icon { width: 38px; height: 38px; align-self: flex-start; }
  .pill { padding: 6px 12px; }
  .cal { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "banner" "today" "timeline" "details" "recent"; gap: 18px; }
  .cal-head { align-items: flex-start; flex-direction: column; }
  .status { padding: 16px; }
  .status-main { flex-basis: 100%; }
  .timeline-card { padding: 16px 0 16px 16px; }
  .timeline-card .tl-top, .timeline-card .tl-foot { padding-right: 16px; }
  .unit-icon { display: none; }
  .unit-text b { font-size: 14px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div:first-child { grid-column: 1 / 3; }
  .unit-edit:not(.compact) { grid-template-columns: auto minmax(0, 1fr); }
  .unit-edit:not(.compact) .tools { grid-column: 1 / -1; justify-content: flex-end; }
  .two { grid-template-columns: 1fr; }
  .gate-card { padding: 26px 20px; }
  .copy-row { flex-direction: column; }
  .mday { height: 44px; }
}
