/* Design system B' (spec thepdfplanner-design-landing-seo mục 3): token + thành phần + trang chủ.
   CSS viết tay, không framework. url(fonts/…) được máy chủ đổi thành URL có phiên bản.
   Trình tạo /create nạp thêm form.css. */

@font-face { font-family: "Roboto"; src: url(/static/fonts/roboto-regular-latin.woff2?v=0502981a32) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Roboto"; src: url(/static/fonts/roboto-medium-latin.woff2?v=bb2bdfcd76) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Roboto Mono"; src: url(/static/fonts/roboto-mono-regular-latin.woff2?v=c49e5f206c) format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --paper: #FAFAF8; --paper-2: #F2F2EE; --white: #FFFFFF;
  --ink: #111111; --ink-2: #555553; --ink-3: #8C8C8C; --ink-hover: #2A2A2C;
  --line: #E3E3DE; --line-2: #CFCFCA;
  --accent: var(--ink); --error: #B91C1C; --ok: #15803D;
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --r: 6px; --r-lg: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  --max: 1120px; --gutter: 16px;
  --frame: #2A2A2C;
}
@media (min-width: 1000px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink);
  font: 400 16px/1.5 var(--font);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2 { font-weight: 500; letter-spacing: -0.02em; }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.01em; color: var(--ink-2); }
.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; }
.js .nojs-only { display: none; }
html:not(.js) .js-only { display: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.small, .note { font-size: 13px; color: var(--ink-2); }

/* Nav: hàng tab như cột tab tháng của planner; điện thoại cuộn ngang, không hamburger */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-in { max-width: var(--max); margin: 0 auto; padding: var(--s3) var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s5); }
.brand { font-weight: 500; font-size: 16px; text-decoration: none; }
.tabs { display: flex; gap: var(--s1); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs a {
  flex: none; display: flex; align-items: center; height: 32px; padding: 0 var(--s3);
  font-size: 13px; text-decoration: none; background: var(--white); border: 1px solid var(--line-2); border-radius: 4px;
}
.tabs a:hover { border-color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
@media (max-width: 699px) { .top-in { flex-direction: column; align-items: flex-start; } .tabs a { height: 44px; } .tabs { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); max-width: none; width: calc(100% + 2 * var(--gutter)); } }

/* Nút, ô chọn */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 40px; padding: 0 var(--s4); font: 500 14px/1 var(--font);
  color: var(--white); background: var(--ink); border: 1px solid var(--ink); border-radius: var(--r);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--ink-hover); }
.btn-2, .btn-quiet { color: var(--ink); background: var(--white); border-color: var(--line-2); }
.btn-2:hover, .btn-quiet:hover { background: var(--paper-2); border-color: var(--ink); }
.btn:disabled { color: var(--ink-3); background: var(--white); border-color: var(--line); cursor: default; }
.btn-s { min-height: 36px; padding: 0 var(--s3); font-size: 13px; }
.icon { flex: none; }
@media (max-width: 699px) { .btn, .btn-s { min-height: 44px; } }
.field { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: var(--s1); }
.field > label { font-size: 13px; color: var(--ink-2); }
select, input[type="text"], input[type="number"] {
  appearance: none; width: 100%; min-height: 40px; min-width: 0; padding: 0 var(--s3);
  font: inherit; font-size: 15px; color: var(--ink); background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r);
}
select {
  padding-right: 36px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23555553' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}
select:hover, input[type="text"]:hover, input[type="number"]:hover { border-color: var(--ink); }
@media (max-width: 699px) { select, input[type="text"], input[type="number"] { min-height: 44px; } }

/* Hero */
.hero { display: grid; gap: var(--s6); padding-top: var(--s6); padding-bottom: var(--s6); }
.hero h1 { margin: 0 0 var(--s3); font-size: 32px; line-height: 1.1; max-width: 18ch; }
.lead { margin: 0 0 var(--s5); color: var(--ink-2); max-width: 52ch; }
.hero-form { display: grid; gap: var(--s3); justify-items: start; }
.hero-fields { display: grid; grid-template-columns: 1.6fr 1fr; gap: var(--s3); width: 100%; max-width: 440px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s2); }
.hero .small { margin: var(--s3) 0 0; }
@media (min-width: 960px) {
  .hero { grid-template-columns: 1fr 1.1fr; align-items: center; padding-top: var(--s7); }
  .hero h1 { font-size: 40px; }
}

/* Khung máy (vẽ bằng CSS) và trang planner bên trong, đúng tỉ lệ máy */
.device {
  position: relative; display: inline-block; max-width: 100%; vertical-align: top;
  padding: 14px 14px 24px; background: var(--frame); border-radius: var(--r-lg);
}
.device::after { content: ""; position: absolute; left: 50%; bottom: 10px; width: 44px; height: 4px; margin-left: -22px; border-radius: 2px; background: #444; }
.device svg, .sheet svg, .zoom-body svg {
  display: block; width: auto; height: auto; max-width: 100%; background: var(--white); border-radius: 2px;
  font-kerning: none; font-variant-ligatures: none; text-rendering: geometricPrecision; /* chữ khớp PDF */
}
.hero-fig { min-width: 0; }
.drawing { margin: 0; text-align: center; }
.drawing svg { max-height: 500px; }
.drawing figcaption { margin-top: var(--s3); }
.hero-fig[aria-busy="true"] svg { opacity: 0.55; transition: opacity 0.15s; }

/* Chú thích bản vẽ: đường đo px và nhãn chỉ dẫn; ẩn dưới 700 px */
.dim, .call { display: none; }
@media (min-width: 700px) {
  .drawing { padding: 32px 120px 0 44px; }
  .dim { display: block; position: absolute; color: var(--ink-3); font: 11.5px var(--mono); }
  .dim::before, .dim::after { content: ""; position: absolute; border: 0 solid var(--ink-3); }
  .dim i { position: relative; font-style: normal; background: var(--paper); padding: 0 6px; color: var(--ink-2); }
  .dim-h { left: 14px; right: 14px; bottom: calc(100% + 12px); border-top: 1px solid var(--ink-3); text-align: center; }
  .dim-h::before, .dim-h::after { top: -5px; height: 10px; border-left-width: 1px; }
  .dim-h::before { left: 0; } .dim-h::after { right: 0; }
  .dim-h i { top: -9px; }
  .dim-v { top: 14px; bottom: 24px; right: calc(100% + 16px); border-left: 1px solid var(--ink-3); }
  .dim-v::before, .dim-v::after { left: -5px; width: 10px; border-top-width: 1px; }
  .dim-v::before { top: 0; } .dim-v::after { bottom: 0; }
  .dim-v i { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%) rotate(-90deg); white-space: nowrap; }
  .call {
    display: block; position: absolute; left: calc(100% + 16px); white-space: nowrap;
    font: 11px var(--mono); color: var(--ink); background: var(--paper); border: 1px solid var(--ink-3); padding: 2px 6px; border-radius: 2px;
  }
  .call::before { content: ""; position: absolute; right: 100%; top: 50%; width: 28px; border-top: 1px solid var(--ink-3); }
  .c1 { top: 18%; } .c2 { bottom: 40px; }
}

/* Hàng số lớn */
.stats { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: var(--s4); border-right: 1px solid var(--line); }
.stats div:nth-child(2n) { border-right: 0; }
.stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.stats dd { margin: 0; font-size: 30px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.stats dt { margin-top: var(--s2); }
@media (min-width: 700px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats div { border-bottom: 0 !important; border-right: 1px solid var(--line) !important; }
  .stats div:first-child { padding-left: 0; } .stats div:last-child { border-right: 0 !important; }
}

/* Khối nội dung */
.block { padding-top: var(--s7); }
.block h2 { margin: 0 0 var(--s4); font-size: 28px; line-height: 1.2; }
.sub { margin: calc(-1 * var(--s2)) 0 var(--s5); color: var(--ink-2); max-width: 62ch; }
@media (min-width: 1000px) { .block { padding-top: var(--s8); } }

/* Tap a day. Không JS: tháng và ngày cạnh nhau (:target hiện ngày vừa bấm). Có JS: một khung */
.tap-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s3); }
.tap-where { margin: 0; flex-basis: 100%; }
.tap-where .narrow { display: none; }
@media (max-width: 699px) { .tap-where .narrow { display: inline; } .tap-where .wide { display: none; } }
@media (min-width: 700px) { .tap [data-enlarge] { display: none; } }
.tap-pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s5); align-items: start; }
.tap-page { margin: 0; min-width: 0; }
.tap-page:nth-child(n+3) { display: none; }
.tap-page:target { display: block; }
.tap-page figcaption { margin-bottom: var(--s2); }
.tap-page:focus { outline: 0; }
.js .tap-pages { display: block; }
.js .tap-page { display: none; }
.js .tap-page.on { display: block; }
.js .tap-page figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tap-page svg { max-height: 680px; }
/* Ba bước kiểu chú thích bản vẽ: số 01/02/03, chữ mono 13 px */
.steps { margin: 0 0 var(--s5); padding: 0; list-style: none; counter-reset: step; max-width: 52ch; font-size: 13px; color: var(--ink); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; padding: var(--s2) 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: "0" counter(step); color: var(--ink-2); }
@media (min-width: 960px) {
  /* Chữ bên trái căn giữa theo chiều cao khung máy (như hero), hai cột cân nhau */
  .js #tap { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto auto auto auto 1fr; column-gap: var(--s7); }
  .js #tap-ui, .js .tap { display: contents; }
  .js #tap > h2 { grid-area: 2 / 1; }
  .js #tap > .sub { grid-area: 3 / 1; }
  .js #tap > .steps { grid-area: 4 / 1; }
  .js .tap-bar { grid-area: 5 / 1; align-content: start; }
  .js .tap-pages { grid-column: 2; grid-row: 1 / span 6; }
  .steps li { padding: var(--s3) 0; }
  .tap-page svg { max-height: 562px; } /* khung máy = 562 + viền 14 + 24 = 600 px, dưới trần 640 */
}
.tap svg a { cursor: pointer; }
.tap svg a:focus { outline: 0; }
.tap svg a:focus-visible rect { fill-opacity: 0.1; stroke: var(--ink); stroke-width: 1.5; }
@media (max-width: 699px) {
  .js .tap-pages { cursor: zoom-in; } /* chạm khung nhỏ mở overlay phóng to (app.js) */
  .tap-page .device { padding: 6px 6px 18px; margin: 0 calc(-1 * var(--gutter) + 4px); max-width: calc(100% + 2 * var(--gutter) - 8px); }
  .tap-page .device::after { bottom: 7px; }
}

/* What's inside: 6 trang thật, 3 × 2 */
.inside { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5) var(--s4); }
.sheet { margin: 0; min-width: 0; }
.sheet svg { width: 100%; box-shadow: var(--shadow); border: 1px solid var(--line); }
.sheet figcaption { margin-top: var(--s2); font-size: 14px; color: var(--ink-2); }
.sheet b { font-weight: 500; color: var(--ink); }
.more { font-size: 14px; font-weight: 500; }
@media (min-width: 700px) { .inside { grid-template-columns: repeat(3, 1fr); gap: var(--s6) var(--s5); } }

/* Bảng */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.specs th, .specs td { padding: var(--s2) var(--s3); text-align: left; border-bottom: 1px solid var(--line); }
.specs thead th { background: var(--paper-2); font-weight: 500; font-size: 13px; color: var(--ink-2); }
.specs tbody th { font-weight: 500; }
.specs tr:last-child > * { border-bottom: 0; }
.specs .num { font-variant-numeric: tabular-nums; }
.block .note { margin: var(--s3) 0 0; max-width: 70ch; }

/* Why, Pricing */
.why { margin: 0; padding: 0; list-style: none; counter-reset: why; max-width: 720px; }
.why li { counter-increment: why; display: grid; grid-template-columns: 40px 1fr; padding: var(--s4) 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.why li::before { content: "0" counter(why); font: 11.5px/24px var(--mono); color: var(--ink-2); }
.why p { margin: 0; }
.why b { font-weight: 500; color: var(--ink); }
.price { max-width: 440px; padding: var(--s5); background: var(--white); border: 1px solid var(--line-2); border-radius: var(--r); }
.price-num { margin: 0 0 var(--s3); font-size: 40px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.price ul { margin: 0 0 var(--s5); padding-left: 18px; }
.price li { margin-bottom: var(--s1); }
.price .small { margin: var(--s3) 0 0; }

/* FAQ: <details> thật */
.faq { max-width: 760px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 48px; padding: var(--s3) 0;
  font-weight: 500; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 20px/1 var(--mono); color: var(--ink-2); }
.faq details[open] summary::after { content: "\2212"; }
.faq-a { padding: 0 0 var(--s4); font-size: 15px; max-width: 68ch; }
.faq-a p, .faq-a ol { margin: 0 0 var(--s2); }
.faq-a ol { padding-left: 22px; }

/* Footer */
.foot { margin-top: var(--s8); padding: var(--s7) 0 var(--s6); background: var(--paper-2); border-top: 1px solid var(--line); }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s5); }
.foot-h { margin: 0 0 var(--s2); font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.foot ul { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.foot li { padding: var(--s1) 0; }
.foot li a { display: inline-block; padding: var(--s2) 0; }
@media (max-width: 699px) { .foot li a { display: block; min-height: 44px; line-height: 28px; } }
.foot-note { margin: var(--s6) 0 0; font-size: 13px; color: var(--ink-2); }

/* Phóng to một trang: điện thoại toàn màn hình, trang rộng gấp đôi để bấm và đọc chữ nhỏ */
.zoom { width: min(100vw - 24px, 900px); max-width: none; height: calc(100dvh - 24px); max-height: none; padding: 0; border: 0; border-radius: var(--r); background: var(--paper-2); color: var(--ink); }
.zoom[open] { display: flex; flex-direction: column; }
.zoom::backdrop { background: rgba(17, 17, 17, 0.6); }
.zoom-bar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); background: var(--white); border-bottom: 1px solid var(--line); }
.zoom-title { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zoom-body { flex: 1; overflow: auto; padding: var(--s3); overscroll-behavior: contain; }
.zoom-body svg { width: 100%; max-width: none; border: 1px solid var(--line); }
@media (max-width: 699px) {
  .zoom { width: 100vw; height: 100dvh; border-radius: 0; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  .zoom-body svg { width: 200%; }
}
