/* Leasly — one stylesheet for the whole app.
   Navy (#18324A) and marigold (#F4B23E) on off-white, Bricolage Grotesque for headings,
   Instrument Sans for everything else. */

:root {
  --ink: #18324A;
  --ink-2: #0E1F2F;
  --ink-soft: #2E4B66;
  --gold: #F4B23E;
  --gold-soft: #FDF0D5;
  --gold-text: #7A4B00;
  --paper: #F5F6F2;
  --white: #FFFFFF;
  --line: #E2E6DE;
  --mist: #E6ECF1;
  --mist-2: #C9D3DC;
  --sage: #D7E4D9;
  --muted: #55687A;
  --green: #2F7D5B;
  --red: #B3261E;
  --red-soft: #FBE9E7;
  --radius: 16px;
  --radius-lg: 20px;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --tabbar-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--ink); }
a:hover { color: var(--ink-2); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.link { font-weight: 600; text-underline-offset: 3px; }
.optional { font-weight: 400; color: var(--muted); }
.tag { display: inline-block; font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: 0; background: var(--gold-soft); color: var(--gold-text); padding: 2px 8px; border-radius: 10px; vertical-align: middle; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; line-height: 1; }
.brand.small .wordmark { font-size: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 26px; border: 0;
  background: var(--gold); color: var(--ink); font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:hover { background: #E9A42C; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-outline { background: var(--white); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--mist); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-2); color: var(--paper); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #8F1E18; color: var(--white); }
.btn-block { width: 100%; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-big { min-height: 56px; padding: 0 28px; font-size: 17px; }
.link-btn { background: none; border: 0; padding: 6px 4px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); }
.link-btn.muted { color: var(--muted); font-weight: 500; }
.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 22px; border: 0; background: transparent;
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--mist); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row .btn { flex: 1 1 140px; }

/* ---------- Forms ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 600; font-size: 15px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  border: 1.5px solid var(--mist-2); background: var(--white); font-size: 16px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(244, 178, 62, .45); }
.hint { font-size: 14px; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex: none; }
.inline-form { display: flex; gap: 8px; }
.inline-form input, .inline-form select { flex: 1; min-width: 0; }

/* ---------- Flash messages ---------- */
.flashes { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; }
.flash { padding: 12px 14px; border-radius: 12px; font-size: 15px; font-weight: 500; }
.flash-success { background: var(--sage); color: #1D4D37; }
.flash-error { background: var(--red-soft); color: #7D1A14; }

/* =========================================================
   Signed-in app
   ========================================================= */
body.app { min-height: 100vh; }
.topbar {
  max-width: 560px; margin: 0 auto; padding: 18px 20px 6px;
  display: flex; align-items: center; justify-content: space-between;
}
.avatar-btn {
  width: 44px; height: 44px; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px; text-decoration: none;
}
.screen { max-width: 560px; margin: 0 auto; padding: 8px 20px calc(var(--tabbar-h) + var(--safe-b) + 32px); }
body.plain .screen { padding-bottom: 48px; }
.page { display: flex; flex-direction: column; gap: 16px; }
.page-title { font-size: 30px; font-weight: 800; }
.section-title { font-size: 19px; font-weight: 800; }

/* Avatars */
.avatars { display: flex; }
.avatar {
  width: var(--av, 30px); height: var(--av, 30px); border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: calc(var(--av, 30px) * .38); font-weight: 600; border: 2px solid var(--paper);
}
.avatars .avatar + .avatar { margin-left: calc(var(--av, 30px) * -.28); }
.av-ink { background: var(--ink); color: var(--paper); }
.av-gold { background: var(--gold); color: var(--ink); }
.av-mist { background: var(--mist-2); color: var(--ink); }
.av-sage { background: var(--sage); color: var(--ink); }
.av-more { background: var(--white); color: var(--muted); }

.who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: -6px; }
.who .muted { font-size: 14px; }
.who-add { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 12px; border-radius: 18px; background: var(--white); border: 1px solid var(--line); }

/* Countdown card */
.countdown { background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.countdown-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.countdown h2 { font-size: 22px; font-weight: 800; }
.countdown-date { font-size: 14px; color: var(--mist-2); }
a.countdown-date { color: var(--gold); font-weight: 600; }
.countdown-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #E1E7EC; }
.countdown-bottom a { color: var(--gold); font-weight: 600; text-decoration: none; }
.countdown-bottom a:hover { text-decoration: underline; }
.bar { height: 8px; border-radius: 4px; background: var(--ink-soft); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--gold); border-radius: 4px; }

/* Rows (Up next) */
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.row {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; display: flex; align-items: center; gap: 14px; text-decoration: none;
}
.row:hover { border-color: var(--mist-2); }
.row-icon { width: 40px; height: 40px; border-radius: 12px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.row-icon.gold, .feature-icon.gold, .choice-icon.gold { background: var(--gold-soft); }
.row-icon.mist, .feature-icon.mist, .choice-icon.mist { background: var(--mist); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-text strong { font-weight: 600; }
.row-text span { font-size: 13px; color: var(--muted); }
.muted-icon { color: var(--muted); flex: none; }

.empty { background: var(--white); border: 1px dashed var(--mist-2); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.nudge { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--gold-soft); text-decoration: none; font-size: 15px; }
.nudge .icon { margin-top: 2px; flex: none; }

/* Cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card-title { font-size: 18px; font-weight: 800; }
.label-small { font-size: 13px; font-weight: 600; color: var(--muted); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.people li { display: flex; align-items: center; gap: 10px; }
.people .avatar { --av: 34px; }
.small-gap { margin-top: -4px; }

/* Segmented control */
.segmented { display: flex; background: var(--mist); border-radius: 22px; padding: 4px; gap: 4px; }
.segmented a { flex: 1; text-align: center; padding: 9px 12px; border-radius: 18px; text-decoration: none; font-weight: 600; font-size: 15px; color: var(--muted); }
.segmented a.is-on { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(24, 50, 74, .12); }

/* Checklist */
.phase { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.phase-head { display: flex; justify-content: space-between; align-items: baseline; }
.empty-line { padding: 4px 2px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 6px 8px 10px; display: flex; align-items: center; gap: 8px; scroll-margin-top: 90px;
}
.check-item:target { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.tick-form, .del-form { flex: none; }
.tick {
  width: 44px; height: 44px; border-radius: 22px; border: 0; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; color: transparent;
}
.tick .icon { width: 28px; height: 28px; padding: 5px; border-radius: 50%; border: 2px solid var(--mist-2); box-sizing: border-box; }
.tick:hover .icon { border-color: var(--ink); color: var(--mist-2); }
.check-item.is-done .tick .icon { background: var(--green); border-color: var(--green); color: var(--white); }
.check-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.check-title { font-weight: 500; line-height: 1.35; }
.check-item.is-done .check-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--mist-2); }
.check-meta { font-size: 13px; color: var(--muted); }
.assign-form select {
  min-height: 32px; width: auto; padding: 2px 28px 2px 10px; border-radius: 16px; font-size: 13px;
  border: 1px solid var(--line); background-color: var(--paper); color: var(--ink); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2355687A' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.add-row { display: flex; gap: 6px; align-items: center; }
.add-row input { min-height: 44px; border-style: dashed; background: transparent; }
.add-row input:focus { border-style: solid; background: var(--white); }
.icon-btn.add { background: var(--ink); color: var(--paper); }
.icon-btn.add:hover { background: var(--ink-2); color: var(--paper); }

/* Settings danger zone */
.danger { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 4px 18px; }
.danger summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--muted); }
.danger form { padding-bottom: 18px; }

/* Coming soon */
.soon { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 8px; }
.soon-icon { width: 72px; height: 72px; border-radius: 22px; background: var(--gold-soft); display: inline-flex; align-items: center; justify-content: center; }

/* Onboarding */
.onboard { display: flex; flex-direction: column; gap: 20px; padding-top: 12px; }
.display { font-size: 34px; font-weight: 800; }
.lead { font-size: 17px; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; color: var(--muted); }
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; text-decoration: none; }
a.choice:hover { border-color: var(--ink); }
.choice.is-static { background: transparent; border-style: dashed; }
.choice-icon { width: 48px; height: 48px; border-radius: 14px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.choice-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.choice-text span { color: var(--muted); font-size: 14px; }

/* Tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--white); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.tab {
  height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 500;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); font-weight: 600; }
.tab.is-active .icon { fill: var(--gold); }
@media (min-width: 600px) {
  .tabbar { left: 50%; transform: translateX(-50%); width: 560px; bottom: 16px; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 6px 24px rgba(24, 50, 74, .10); padding-bottom: 0; }
  .screen { padding-bottom: calc(var(--tabbar-h) + 56px); }
}

/* =========================================================
   Public site
   ========================================================= */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 720px; }
.site-header { padding: 18px 0; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-nav { display: flex; align-items: center; gap: 14px; }
.nav-link { font-weight: 600; text-decoration: none; padding: 10px 4px; }
.nav-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero { padding: 28px 0 56px; }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: center; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 56px; } .hero { padding: 48px 0 88px; } }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.hero-title { font-size: clamp(40px, 7vw, 68px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; }
.hero-lead { font-size: 18px; color: #33485C; margin-top: 18px; max-width: 34em; }
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 26px; }
.hero-note { font-size: 14px; color: var(--muted); margin-top: 14px; }

.hero-phone { display: flex; justify-content: center; }
.phone {
  width: 300px; border-radius: 40px; background: var(--ink); padding: 10px;
  box-shadow: 0 30px 60px -20px rgba(24, 50, 74, .45); transform: rotate(2.5deg);
}
.phone-screen { background: var(--paper); border-radius: 31px; padding: 26px 18px 22px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.ph-muted { color: var(--muted); font-size: 12px; }
.ph-title { font-family: var(--display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; margin-top: -6px; }
.ph-avatars { display: flex; }
.ph-avatars .avatar { --av: 26px; }
.ph-avatars .avatar + .avatar { margin-left: -7px; }
.ph-count { background: var(--ink); color: var(--paper); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.ph-count p:first-child { font-family: var(--display); font-weight: 800; font-size: 16px; }
.ph-count .bar { height: 6px; }
.ph-small { font-size: 11px; color: var(--mist-2); }
.ph-row { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; display: flex; align-items: center; gap: 10px; }
.ph-row .row-icon { width: 30px; height: 30px; border-radius: 9px; }
.ph-row > span:last-child { display: flex; flex-direction: column; }
.ph-row strong { font-weight: 600; font-size: 13px; }
.ph-row em { font-style: normal; color: var(--muted); font-size: 11px; }

.band { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 0; }
.band-title { font-size: 32px; font-weight: 800; margin-bottom: 28px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps h3 { font-size: 20px; margin: 12px 0 6px; }
.steps p { color: #33485C; }
.step-num { width: 40px; height: 40px; border-radius: 50%; background: var(--gold); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 18px; }

.features { display: grid; grid-template-columns: 1fr; gap: 16px; padding-top: 56px; padding-bottom: 56px; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feature { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.feature h3 { font-size: 21px; }
.feature p { color: #33485C; }
.feature-icon { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; }

.trust { background: var(--ink); color: var(--paper); padding: 56px 0; }
.trust-inner { max-width: 760px; }
.trust h2 { font-size: clamp(28px, 4.5vw, 40px); font-weight: 800; color: var(--gold); }
.trust p { margin-top: 12px; font-size: 18px; color: #E1E7EC; }

.faq { padding-top: 56px; padding-bottom: 32px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 17px; }
.faq details p { padding: 0 0 16px; color: #33485C; }

.final-cta { padding: 48px 0 72px; }
.final-cta h2 { font-size: 30px; font-weight: 800; margin-bottom: 18px; }

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 36px; }
.site-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.site-footer nav { display: flex; gap: 18px; }
.site-footer a { color: var(--muted); }
.site-footer p { font-size: 14px; }

/* Auth pages */
.auth { padding: 24px 20px 64px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-size: 28px; font-weight: 800; }
.auth-switch { text-align: center; font-size: 15px; }

/* Legal */
.legal { padding-top: 20px; padding-bottom: 64px; }
.legal h1 { font-size: 38px; font-weight: 800; margin-bottom: 8px; }
.legal h2 { font-size: 21px; margin: 28px 0 8px; }
.legal p, .legal li { color: #33485C; }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal li { margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .phone { transform: none; }
}
