@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/barlow-condensed-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/assets/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f1ecdd;
  --ink: #191a17;
  --muted: #56554f;
  --orange: #f16b4b;
  --accent: #a53820;
  --rule: #b9b5a8;
  --body: Inter, "PingFang HK", "Noto Sans CJK HK", "Microsoft JhengHei", sans-serif;
  --display: "Barlow Condensed", Impact, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button, input { font: inherit; }
button { cursor: pointer; }
button, input[type="email"] { border-radius: 0; }
p, h1, h2, h3 { margin: 0; }
img { display: block; max-width: 100%; }
.wrap { width: min(100% - clamp(2.5rem, 10vw, 10rem), 77rem); margin-inline: auto; }
.skip { position: absolute; z-index: 2; top: .5rem; left: .5rem; padding: .65rem; background: var(--paper); transform: translateY(-180%); }
.skip:focus { transform: none; }
.mast, .campaign { background: var(--ink); color: var(--paper); }
.mast-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 4.75rem; border-bottom: 1px solid #68695f; }
.wordmark { font: 800 clamp(1.55rem, 2.6vw, 2rem)/1 var(--display); text-transform: uppercase; letter-spacing: -.025em; text-decoration: none; }
.mast .wordmark { display: inline-flex; align-items: center; gap: .7rem; min-height: 44px; }
.wordmark img { width: 1.9rem; height: auto; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(1rem, 2.7vw, 2.5rem); }
nav a { display: inline-flex; min-height: 44px; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 650; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.mast a:hover { color: var(--orange); }
.mast a:focus-visible { outline-color: var(--orange); }
.campaign { position: relative; isolation: isolate; }
.campaign-grid {
  display: grid;
  grid-template-areas: "title ." "copy .";
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  grid-template-rows: minmax(min-content, 1fr) auto;
  column-gap: clamp(2rem, 5.6vw, 6.25rem);
  min-height: clamp(33rem, 79svh, 53rem);
}
h1 {
  grid-area: title;
  position: relative;
  z-index: 1;
  align-self: end;
  margin: .32em 0 .16em -.025em;
  font: 800 clamp(4.8rem, min(9.6vw, 14svh), 8.7rem)/.86 var(--display);
  letter-spacing: -.035em;
}
h1 > span { display: block; }
.campaign-frame { position: absolute; z-index: 0; inset: 0 0 0 27%; display: block; overflow: hidden; }
.campaign-frame img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 49% center; }
.campaign-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink), rgb(25 26 23 / .84) 16%, rgb(25 26 23 / .12) 38%, transparent 52%); }
.campaign-copy { grid-area: copy; z-index: 1; position: relative; min-width: 0; max-width: 34rem; padding-bottom: clamp(1.3rem, 3vw, 2.8rem); }
.campaign-lede { color: var(--paper); font-size: clamp(1rem, 1.45vw, 1.25rem); line-height: 1.45; font-weight: 560; text-wrap: pretty; }
.campaign-lede strong { font-weight: 800; white-space: nowrap; }
#visit-counter { margin-top: .85rem; padding-inline-start: clamp(.75rem, 1.4vw, 1.3rem); border-left: 3px solid var(--orange); }
#visit-label { font-size: clamp(.96rem, 1.25vw, 1.1rem); font-weight: 600; letter-spacing: 0; line-height: 1.45; text-wrap: pretty; }
#visit-time { margin: .22rem 0 .35rem; color: var(--orange); font-size: clamp(2.75rem, 5.2vw, 4.65rem); font-weight: 740; line-height: 1.08; letter-spacing: -.045em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#visit-time[data-unit="hours"], #visit-time[data-unit="days"] { font-size: clamp(1.6rem, 3vw, 2.7rem); }
.visit-rate, .visit-fallback { max-width: 34em; color: #e3e0d6; font-size: .88rem; line-height: 1.55; }
.visit-rate strong { color: var(--paper); white-space: nowrap; }
sup { position: relative; vertical-align: baseline; top: -.35em; font-size: .75em; line-height: 0; }
.ref-mark { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; min-width: 24px; min-height: 24px; margin-block: -4px; line-height: 1; color: var(--accent); font-weight: 700; letter-spacing: 0; text-underline-offset: .16em; }
.visit-rate .ref-mark { color: var(--orange); }
.translation { display: block; color: var(--muted); font-size: .9rem; line-height: 1.6; }
.section-grid { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: clamp(2rem, 6.8vw, 7rem); align-items: start; }
h2 { font-size: clamp(2rem, 3.8vw, 3.9rem); font-weight: 780; line-height: 1.15; letter-spacing: -.065em; }
.section-body { min-width: 0; }
.signup { padding-block: clamp(2.7rem, 5.2vw, 5rem); }
.signup .primary { gap: .6rem; }
.signup .primary [lang="en"] { font-size: .84em; font-weight: 600; }
.field-label { display: block; margin: 0 0 .4rem; font-weight: 700; }
.field-label span { font-size: .85rem; }
input[type="email"] { display: block; width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--ink); color: var(--ink); background: #fcf9f0; min-height: 48px; }
.bot-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.consent { display: grid; grid-template-columns: 1.25rem 1fr; gap: .7rem; align-items: start; margin-top: 1.2rem; padding: .15rem 0; cursor: pointer; line-height: 1.55; }
.consent input { width: 1.15rem; height: 1.15rem; margin: .25rem 0 0; accent-color: var(--ink); }
.consent .translation, .notice .translation { margin-top: .28rem; font-size: .83rem; }
.notice { margin: .85rem 0 1.1rem; color: var(--muted); font-size: .85rem; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: .4em; border: 1px solid var(--ink); padding: .75rem 1.2rem; min-height: 48px; font-weight: 700; line-height: 1.45; background: var(--orange); color: var(--ink); }
.primary:hover { background: #fc896c; }
button[aria-disabled="true"], button:disabled { cursor: wait; opacity: .7; }
.status:not(:empty) { margin-block: .85rem; font-weight: 620; }
.status > span, .error > span { display: block; }
.status > [lang="en"], .error > [lang="en"] { font-size: .87rem; }
.status[data-state="error"], .error { color: #982820; }
.error { margin: .4rem 0; font-size: .88rem; }
[aria-invalid="true"] { outline: 2px solid #982820; outline-offset: 1px; }
.policies { border-top: 1px solid var(--ink); }
details { border-bottom: 1px solid var(--rule); }
summary { position: relative; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .75rem; padding: 1.05rem 2.5rem 1.05rem 0; font-size: 1.06rem; font-weight: 700; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary span { font-size: .85rem; color: var(--muted); font-weight: 500; }
summary::after { content: "+"; position: absolute; right: .1rem; top: 50%; transform: translateY(-50%); font-size: 1.45rem; font-weight: 400; line-height: 1; }
details[open] > summary::after { content: "−"; }
.policy-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2.8rem; }
.policy-body, .policy-links { padding-bottom: 1.3rem; }
.policy-body { font-size: .94rem; overflow-wrap: anywhere; }
.policy-body h3 { margin: .3rem 0 .45rem; font-size: 1rem; }
.policy-body p + h3 { margin-top: 1.1rem; }
.policy-body p + p { margin-top: .7rem; }
.policy-links { display: flex; flex-wrap: wrap; gap: .75rem 1rem; }
.footer { padding-block: clamp(2.5rem, 5vw, 4.5rem); background: var(--ink); color: var(--paper); }
.about-layout {
  display: grid;
  grid-template: "photo heading" auto "photo intro" auto "photo body" 1fr / minmax(0, .83fr) minmax(0, 1.17fr);
  align-items: start;
  gap: 1.2rem clamp(2rem, 6.8vw, 7rem);
}
.about-heading { grid-area: heading; }
.about-portrait { grid-area: photo; width: min(100%, 27rem); height: auto; }
.about-intro { grid-area: intro; max-width: 37rem; font-size: clamp(1rem, 1.45vw, 1.25rem); font-weight: 600; }
.about-intro strong { white-space: nowrap; }
.footer .wordmark { margin-top: .8rem; font-size: 1.5rem; color: var(--orange); }
.about-copy { grid-area: body; max-width: 38rem; }
.about-copy p + p { margin-top: .75rem; }
.about-copy .translation { margin-top: 1.15rem; }
.about-copy .translation, .about-copy h3 span { color: #c9c5b8; }
.about-copy h3 { margin-top: 1.6rem; font-size: 1.1rem; }
.about-copy h3 span { margin-inline-start: .3rem; font-size: .84rem; font-weight: 500; }
.about-copy address { font-style: normal; }
.footer a { display: inline-block; min-height: 44px; padding-block: .5rem; }
.footer a:hover { color: var(--orange); }
.footer a:focus-visible { outline-color: var(--orange); }
.time-study {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  column-gap: clamp(2rem, 6.8vw, 7rem);
  padding-block: clamp(2rem, 5vw, 4.5rem);
  border-top: 1px solid var(--ink);
}
.time-study h2 { grid-column: 1; grid-row: 1; max-width: 12em; text-wrap: balance; }
.time-study > :not(h2) { grid-column: 2; min-width: 0; }
.calc-result { grid-row: 1; }
.study-method { margin-top: 1.1rem; border: 0; }
.study-method > summary {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-height: 44px;
  padding: .45rem .85rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: .95rem;
}
.study-method > summary::after { position: static; transform: none; line-height: 1; font-size: 1.15rem; }
.study-method > summary:hover, .study-method[open] > summary { color: var(--paper); background: var(--ink); }
.study-method > .calc-breakdown { margin-top: 1rem; }
#hk-hours:empty { display: none; }
.result-caption { color: var(--muted); font-size: .95rem; }
.time-value { margin: .25rem 0 0; font-size: clamp(2.7rem, 5.3vw, 5rem); font-weight: 760; letter-spacing: -.06em; line-height: 1.16; color: var(--accent); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.calendar-value { font-size: clamp(1.9rem, 4.1vw, 3.7rem); line-height: 1.2; word-break: keep-all; text-wrap: balance; }
.clock-value { margin-top: .2rem; font-size: clamp(1.1rem, 2.2vw, 1.8rem); line-height: 1.35; color: var(--accent); font-weight: 650; font-variant-numeric: tabular-nums; }
.minutes-value { margin-top: .35rem; font-size: clamp(1.06rem, 1.5vw, 1.3rem); font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.date-range, .study-note { color: var(--muted); font-size: .87rem; }
.date-range, .study-note, .calc-breakdown p + p { margin-top: .45rem; }
.calc-breakdown { margin-top: 1.45rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.calc-formula { margin-top: .4rem; font-size: .95rem; font-variant-numeric: tabular-nums; }
#hk-formula:empty { display: none; }
.period-estimates { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .6rem 1.5rem; margin: .95rem 0; }
.period-estimates dt { color: var(--muted); font-size: .86rem; }
.period-estimates dd { margin: .15rem 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.study-scope { margin-top: .85rem; font-size: .94rem; color: var(--muted); }
.study-membership { margin-top: .85rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: .94rem; }
.study-sources { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--rule); }
.study-sources h3, .calculator-controls h3 { font-size: 1rem; }
.study-sources ul { list-style: none; margin: .25rem 0 0; padding: 0; }
.study-sources a { display: inline-flex; gap: .4em; align-items: baseline; color: var(--muted); font-size: .86rem; padding: .3em 0; }
.study-sources a:target { color: var(--accent); text-decoration-thickness: 2px; }
.study-sources a > span { font-weight: 700; white-space: nowrap; }
.personal-study { border-top: 1px solid var(--ink); border-bottom: 0; }
.personal-study > summary { padding-block: 1.3rem; font-size: clamp(1.1rem, 1.7vw, 1.45rem); }
.personal-body { display: grid; grid-template-columns: minmax(0,1.17fr) minmax(0,.83fr); gap: 1.5rem clamp(1rem,5vw,4rem); padding: .5rem 0 1.7rem; }
.calc-inputs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem .8rem; padding-block: .45rem .4rem; }
.calc-inputs label { display: flex; flex-direction: column; gap: .22rem; color: var(--ink); font-size: .88rem; font-weight: 640; }
.calc-inputs label > span { display: flex; gap: .35rem; align-items: center; margin-top: auto; font-size: .85rem; font-weight: 450; }
.calc-inputs input { min-width: 0; width: min(100%, 6.8rem); min-height: 44px; border: 1px solid var(--ink); border-radius: 0; padding: .35rem .55rem; font-size: 1rem; background: #fcf9f0; color: var(--ink); }
.calc-warning { color: #982820; font-size: .9rem; margin-top: .6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .time-study { display: block; }
  .personal-body { grid-template-columns: minmax(0,1fr); }
  .time-study h2 { margin-bottom: 1.3rem; }
}

::selection { color: var(--ink); background: #ffad8c; }
@media (max-width: 760px) {
  .mast-inner { min-height: 4rem; }
  .section-grid, .policy-body { grid-template-columns: 1fr; gap: 1.3rem; }
}
@media (max-width: 660px) {
  .about-layout {
    grid-template: "heading heading" auto "photo intro" auto "body body" auto / minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 1.25rem clamp(1rem, 4vw, 1.5rem);
  }
  .about-intro { align-self: center; }
}
@media (max-width: 720px) {
  .campaign-grid {
    width: 100%;
    grid-template-areas: "poster" "copy";
    grid-template-columns: 1fr;
    grid-template-rows: minmax(10rem, 1fr) auto;
    min-height: calc(100svh - 4rem - 4.5rem);
  }
  .campaign-frame { grid-area: poster; position: relative; inset: auto; }
  .campaign-frame img { object-position: 50% 22%; }
  .campaign-frame::after { background: linear-gradient(0deg, var(--ink), rgb(25 26 23 / .7) 10%, transparent 33%); }
  h1, .campaign-copy { width: calc(100% - max(2.5rem, 10vw)); margin-inline: auto; }
  h1 { grid-area: poster; margin-block: 0; padding-bottom: .12em; font-size: clamp(2.3rem, 13vw, 5.9rem); line-height: .94; }
  h1 > span { display: inline; }
  .campaign-copy { padding-block: .9rem 1.25rem; max-width: none; }
  #visit-counter { margin-top: .65rem; }
  .signup { padding-top: 1.4rem; }
}
@media (min-width: 721px) and (max-height: 520px) {
  h1 { font-size: clamp(3rem, 11svh, 4rem); }
  h1 > span { display: inline; }
  .campaign-grid { min-height: 0; }
}
@media (orientation: landscape) and (max-width: 960px) and (max-height: 480px) {
  .mast-inner { min-height: 3.25rem; }
  .campaign-grid {
    width: 100%;
    grid-template-areas: "poster copy";
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    grid-template-rows: auto;
    column-gap: 0;
    min-height: calc(100svh - 3.25rem - 4.5rem);
  }
  .campaign-frame { position: relative; inset: auto; grid-area: poster; }
  .campaign-frame::after { background: linear-gradient(0deg, var(--ink), transparent 42%); }
  h1 { grid-area: poster; width: calc(100% - 2.4rem); margin: 0 auto; padding-bottom: .25em; font-size: clamp(2rem, 5.4vw, 3rem); line-height: .93; }
  h1 > span { display: inline; }
  .campaign-copy { width: auto; margin: 0; align-self: center; padding: .7rem 1.25rem; }
  #visit-counter { margin-top: .45rem; }
  #visit-time { font-size: clamp(2.4rem, 5vw, 3rem); }
  .signup { grid-template-columns: 1fr; padding-top: 1.3rem; }
}
@media (max-width: 440px) {
  .wrap:not(.campaign-grid) { width: calc(100% - 2.5rem); }
  .mast-inner { gap: .5rem; }
  .mast .wordmark { font-size: 1.45rem; }
  nav { gap: .75rem; }
  nav a { font-size: .78rem; }
  .signup .primary { width: 100%; }
}
@media (max-width: 320px) {
  .wrap:not(.campaign-grid), h1, .campaign-copy { width: calc(100% - 1.75rem); }
  .mast .wordmark { font-size: 1.3rem; }
}
@media (orientation: portrait) and (max-width: 440px) and (max-height: 550px) {
  .mast-inner { min-height: 2.9rem; }
  .campaign-grid { grid-template-rows: minmax(7.65rem, 1fr) auto; min-height: calc(100svh - 2.9rem - 3.7rem); }
  .campaign-copy { padding-block: .45rem .7rem; }
  #visit-counter { margin-top: .35rem; }
  #visit-label { line-height: 1.3; }
  #visit-time { margin: .12rem 0 .2rem; font-size: 2.35rem; }
  .visit-rate { font-size: .84rem; line-height: 1.4; }
  .signup { padding-top: .75rem; }
}
