/* Layout: a rent book. Ledger-ruled paper, bank-ink green, and one red seal reserved for what is due or overdue. */
:root {
  --paper: #f3f6f4;
  --surface: #ffffff;
  --ink: #12302a;
  --ink-2: #4a625b;
  --rule: #d3dfd9;
  --green: #136a51;
  --green-soft: #e1efe9;
  --seal: #c3362c;
  --seal-soft: #fbe9e6;
  --amber: #a5670f;
  --amber-soft: #fbf0dc;
  --phone: #0f1f1b;
  --font-body: "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;
  --font-hand: "LXGW WenKai TC", "Kaiti TC", "BiauKai", "STKaiti", serif;
  --font-num: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1714; --surface: #14211d; --ink: #e2ede8; --ink-2: #9cb2aa; --rule: #26362f;
    --green: #52c39b; --green-soft: #17322a; --seal: #f0695d; --seal-soft: #3a1c19;
    --amber: #e3a948; --amber-soft: #3a2b12; --phone: #050a09; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1714; --surface: #14211d; --ink: #e2ede8; --ink-2: #9cb2aa; --rule: #26362f;
  --green: #52c39b; --green-soft: #17322a; --seal: #f0695d; --seal-soft: #3a1c19;
  --amber: #e3a948; --amber-soft: #3a2b12; --phone: #050a09; color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.25; }
p { margin: 0; }
a { color: var(--green); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }

/* Header */
.top { padding-block: 20px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-seal {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 2px solid var(--seal); color: var(--seal); border-radius: 6px;
  font-family: var(--font-hand); font-weight: 700; font-size: 18px; transform: rotate(-5deg);
}
.brand-name { font-weight: 900; font-size: 20px; letter-spacing: 0.08em; }
.top nav { display: flex; gap: 20px; align-items: center; font-size: 15px; }
.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font: inherit; font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green); color: var(--surface); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink-2); }
.top .btn { padding: 8px 16px; font-size: 14px; }

/* Hero */
.hero { padding-block: 40px 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.eyebrow { font-size: 14px; font-weight: 500; color: var(--green); letter-spacing: 0.12em; }
.hero h1 { font-size: clamp(40px, 6.2vw, 72px); font-weight: 900; letter-spacing: 0.01em; line-height: 1.15; }
.hero h1 .hand { font-family: var(--font-hand); font-weight: 700; color: var(--seal); }
.hero .lede { font-size: 19px; color: var(--ink-2); max-width: 34em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { font-size: 14px; color: var(--ink-2); display: flex; gap: 16px; flex-wrap: wrap; }
.hero-note span::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* Phone mock */
.phone {
  justify-self: center; width: 100%; max-width: 340px;
  background: var(--phone); border-radius: 40px; padding: 12px;
  box-shadow: 0 30px 60px -30px rgba(10, 40, 30, .45);
}
.screen {
  background: var(--paper); border-radius: 30px; padding: 22px 16px 18px;
  display: flex; flex-direction: column; gap: 14px; min-height: 560px;
}
.screen-head { display: flex; justify-content: space-between; align-items: baseline; padding-inline: 4px; }
.screen-head h3 { font-size: 22px; font-weight: 900; }
.screen-head .month { font-family: var(--font-hand); color: var(--ink-2); font-size: 16px; }
.tally { background: var(--surface); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.tally-label { font-size: 13px; color: var(--ink-2); }
.tally-fig { font-size: 15px; }
.tally-fig strong { font-size: 24px; font-weight: 600; color: var(--ink); }
.bar { height: 8px; background: var(--rule); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 77.8%; background: var(--green); border-radius: 99px; }
.todo { display: flex; flex-direction: column; gap: 8px; }
.item {
  background: var(--surface); border-radius: 14px; padding: 12px 14px;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start;
}
.chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; margin-top: 2px; }
.chip-due { background: var(--seal-soft); color: var(--seal); }
.chip-soon { background: var(--amber-soft); color: var(--amber); }
.chip-done { background: var(--green-soft); color: var(--green); }
.chip-info { background: var(--paper); color: var(--ink-2); border: 1px solid var(--rule); }
.item-main { font-size: 14px; line-height: 1.5; min-width: 0; }
.item-main b { font-weight: 700; }
.item-sub { font-size: 12.5px; color: var(--ink-2); }
.item-action {
  grid-column: 2; justify-self: start; margin-top: 6px; font-size: 13px; font-weight: 700;
  background: var(--green); color: var(--surface); border-radius: 8px; padding: 5px 12px;
}
.example-tag { text-align: center; font-size: 12px; color: var(--ink-2); margin-top: auto; }

/* Section shell */
section.band { padding-block: 72px; }
.band-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; max-width: 40em; }
.band-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 900; }
.band-head p { color: var(--ink-2); font-size: 17px; }
.band-alt { background: var(--surface); }

/* Year strip */
.year { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.mon { border-right: 1px solid var(--rule); padding: 10px 8px 16px; display: flex; flex-direction: column; gap: 8px; min-height: 190px; min-width: 0; }
.mon:last-child { border-right: 0; }
.mon-name { font-family: var(--font-hand); font-size: 20px; font-weight: 700; }
.tag { font-size: 12px; line-height: 1.4; padding: 4px 6px; border-radius: 6px; }
.tag-rent { color: var(--ink-2); border: 1px dashed var(--rule); }
.tag-rates { background: var(--amber-soft); color: var(--amber); font-weight: 500; }
.tag-tax { background: var(--seal-soft); color: var(--seal); font-weight: 700; }
.year-legend { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; font-size: 14px; color: var(--ink-2); }
.year-legend .tag { display: inline-block; margin-right: 6px; }
.year-extra { margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.extra { border-left: 3px solid var(--green); padding: 4px 0 4px 16px; }
.extra b { display: block; font-size: 16px; }
.extra span { color: var(--ink-2); font-size: 15px; }

/* Features */
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.feat { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.feat-mark { font-family: var(--font-hand); font-size: 44px; line-height: 1; color: var(--green); }
.feat h3 { font-size: 21px; font-weight: 700; }
.feat p { color: var(--ink-2); }
.also { margin-top: 44px; display: flex; flex-wrap: wrap; gap: 10px; }
.also span { border: 1px solid var(--rule); border-radius: 99px; padding: 6px 14px; font-size: 14px; color: var(--ink-2); background: var(--paper); }

/* Calculator */
.calc {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; overflow: hidden;
}
.calc-in { padding: 32px; display: flex; flex-direction: column; gap: 20px; border-right: 1px solid var(--rule); min-width: 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: 14px; font-weight: 700; }
.field .hint { font-size: 13px; color: var(--ink-2); }
.input {
  font: inherit; font-size: 18px; padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid var(--rule); background: var(--paper); color: var(--ink); width: 100%;
}
.input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--green-soft); }
.input-money { position: relative; }
.input-money .input { padding-left: 46px; }
.input-money::before { content: "HK$"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); font-family: var(--font-num); font-size: 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }

.calc-out {
  position: relative; padding: 32px 32px 32px 64px; min-width: 0;
  background:
    linear-gradient(90deg, transparent 44px, var(--seal) 44px, var(--seal) 45px, transparent 45px),
    repeating-linear-gradient(var(--paper) 0 35px, var(--rule) 35px 36px);
  display: flex; flex-direction: column; gap: 18px;
}
.calc-out .label { font-size: 14px; color: var(--ink-2); }
.stamp {
  align-self: flex-start; border: 3px solid var(--seal); color: var(--seal); border-radius: 10px;
  padding: 10px 18px 12px; transform: rotate(-3deg); background: var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.stamp small { font-family: var(--font-hand); font-size: 16px; letter-spacing: 0.3em; }
.stamp .num { font-size: 40px; font-weight: 600; line-height: 1.1; }
.stamp.press { animation: press .35s ease-out; }
@keyframes press { 0% { transform: rotate(-3deg) scale(1.12); opacity: .4; } 100% { transform: rotate(-3deg) scale(1); opacity: 1; } }
.lines { display: flex; flex-direction: column; gap: 0; font-family: var(--font-hand); font-size: 17px; }
.lines div { min-height: 36px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.lines div span:last-child { font-family: var(--font-num); font-size: 15px; white-space: nowrap; }
.deadline { background: var(--amber-soft); color: var(--amber); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.deadline b { font-size: 17px; }
.penalty { font-size: 14px; color: var(--ink-2); }
.penalty table { width: 100%; border-collapse: collapse; margin-top: 6px; background: var(--surface); border-radius: 10px; overflow: hidden; }
.penalty td { padding: 6px 12px; border-top: 1px solid var(--rule); }
.penalty tr:first-child td { border-top: 0; }
.penalty td:last-child { text-align: right; font-family: var(--font-num); color: var(--seal); }
.calc-foot { margin-top: 16px; font-size: 13px; color: var(--ink-2); }

/* Waitlist */
.wl { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.wl-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wl-copy h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 900; }
.wl-copy p { color: var(--ink-2); font-size: 17px; }
.wl-copy ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; }
.plans { display: flex; flex-direction: column; gap: 12px; }
.plan { background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: 16px 18px; }
.plan-paid { border-color: var(--green); }
.plan-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.plan-head b { font-size: 17px; color: var(--ink); }
.plan-tag { font-size: 14px; color: var(--green); font-weight: 500; }
.plan ul { font-size: 15px; }
.soon { display: inline-block; font-size: 12px; line-height: 1; padding: 3px 7px; border-radius: 999px; background: var(--green-soft); color: var(--green); white-space: nowrap; vertical-align: 1px; }
.plan-offer { margin-top: 10px; font-size: 15px !important; color: var(--seal) !important; font-weight: 500; }
form.wl-form { background: var(--surface); border: 1px solid var(--rule); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { cursor: pointer; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: inline-block; padding: 7px 14px; border-radius: 99px; border: 1.5px solid var(--rule); font-size: 14px; background: var(--paper); }
.choices input:checked + span { border-color: var(--green); background: var(--green-soft); color: var(--green); font-weight: 700; }
.choices input:focus-visible + span { outline: 3px solid var(--green); outline-offset: 2px; }
.err { color: var(--seal); font-size: 14px; }
.done { text-align: center; padding: 28px 12px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.done .stamp { align-self: center; }
.done p { color: var(--ink-2); font-size: 15px; }

footer { padding-block: 40px 56px; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-2); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero .wrap, .wl { grid-template-columns: 1fr; gap: 40px; }
  .calc { grid-template-columns: 1fr; }
  .calc-in { border-right: 0; border-bottom: 1px solid var(--rule); }
  .feats { grid-template-columns: 1fr; gap: 32px; }
  .year { grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 0; }
  .mon { border-top: 2px solid var(--ink); min-height: 150px; }
  .mon:nth-child(4n) { border-right: 0; }
  .top nav a:not(.btn) { display: none; }
}
@media (max-width: 560px) {
  .year { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mon:nth-child(4n) { border-right: 1px solid var(--rule); }
  .mon:nth-child(3n) { border-right: 0; }
  .year-extra, .row2 { grid-template-columns: 1fr; }
  .calc-in, .calc-out { padding: 24px 20px; }
  .calc-out { padding-left: 56px; }
  .hero { padding-block: 24px 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .stamp.press { transition: none; animation: none; }
}

/* Language switch */
.lang { font-size: 14px; font-weight: 700; color: var(--ink-2); text-decoration: none; border: 1.5px solid var(--rule); border-radius: 99px; padding: 4px 12px; }
.lang:hover { color: var(--ink); border-color: var(--ink-2); }
@media (max-width: 900px) { .top nav a.lang { display: inline-block; } }

/* Calculator extras */
.lines .total { font-weight: 700; border-top: 1px solid var(--ink-2); }
.tip { background: var(--seal-soft); color: var(--seal); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
.ird-note { font-size: 13px; color: var(--ink-2); }
.calc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.calc-actions .btn { padding: 8px 14px; font-size: 14px; background: var(--surface); }

/* The nav link colour must not override the primary button's text colour. */
.top nav a.btn-primary, .top nav a.btn-primary:hover { color: var(--surface); }
