:root {
  --bg: #F6F4F0;
  --surface: #FFFFFF;
  --ink: #1C1917;
  --muted: #57534E;
  --line: #E4DED6;
  --brand: #F59E0B;
  --accent: #B45309;
  --board: #1C1917;
  --board-raised: #2E2925;
  --on-board: #FAFAF9;
  --on-board-muted: #C8C2BA;
  --board-line: rgba(255, 255, 255, 0.10);
  --ok: #15803D;
  --bad: #B91C1C;
  --field: #FFFFFF;
  --display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100E; --surface: #1C1917; --ink: #F5F5F4; --muted: #C8C2BA;
    --line: #34302C; --accent: #F59E0B; --board: #0B0A09; --board-raised: #24201C;
    --ok: #4ADE80; --bad: #F87171; --field: #12100E; color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #12100E; --surface: #1C1917; --ink: #F5F5F4; --muted: #C8C2BA;
  --line: #34302C; --accent: #F59E0B; --board: #0B0A09; --board-raised: #24201C;
  --ok: #4ADE80; --bad: #F87171; --field: #12100E; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--body);
}
a { color: var(--accent); }
a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 2px;
}
h1, h2, h3, h4 {
  font-family: var(--display); line-height: 1.2; margin: 0; text-wrap: balance; color: var(--ink);
}
p { margin: 0 0 16px; }
[id] { scroll-margin-top: 24px; }

.wrap {
  max-width: 840px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.site-header {
  background: var(--board); color: var(--on-board);
  padding-block: 16px; border-bottom: 1px solid var(--board-line);
}
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 10px; color: var(--on-board);
  text-decoration: none; font-weight: 800; font-size: 18px;
}
.logo img { width: 32px; height: 32px; border-radius: 8px; }
.top-links { display: flex; align-items: center; gap: 16px; }
.top-links a {
  color: var(--on-board-muted); font-weight: 600; font-size: 15px; text-decoration: none;
}
.top-links a:hover { color: var(--on-board); }
/* The header button keeps its dark text on the amber fill. */
.top-links a.btn-primary, .top-links a.btn-primary:hover { color: #1C1917; }

.btn {
  display: inline-block; text-align: center;
  padding: 10px 18px; border-radius: 10px;
  font: 700 15px/1.15 var(--body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 120ms ease, background 120ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #1C1917; }
.btn-primary:hover { background: #E08E0B; }
.btn-outline { color: var(--ink); border-color: var(--line); background: var(--surface); }
.btn-app {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; padding: 16px 24px; font-size: 17px; margin-top: 20px;
  border-radius: 12px;
}

.breadcrumbs {
  padding: 18px 0 0; font-size: 13px; font-family: var(--mono); color: var(--muted);
}
.breadcrumbs ol {
  list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.breadcrumbs li {
  display: flex; align-items: center; gap: 6px; margin: 0;
}
.breadcrumbs li:not(:last-child)::after {
  content: "/"; color: var(--line);
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

main.guide-article { padding-block: 28px 64px; }
.guide-header { margin-bottom: 28px; }
.guide-header h1 {
  font-size: clamp(28px, 4.5vw, 42px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px;
}
.lead {
  font-size: 19px; line-height: 1.6; color: var(--ink); font-weight: 500; margin-bottom: 24px;
}

h2 {
  font-size: clamp(22px, 3.2vw, 28px); font-weight: 800; letter-spacing: -0.01em;
  margin-top: 48px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
h3 {
  font-size: 19px; font-weight: 700; margin-top: 28px; margin-bottom: 12px;
}

.steps {
  padding-left: 0; list-style: none; counter-reset: step-counter;
  margin: 24px 0; display: grid; gap: 20px;
}
.steps > li {
  position: relative; counter-increment: step-counter; padding-left: 48px; margin-bottom: 0;
  min-width: 0;
}
.steps > li::before {
  content: counter(step-counter); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; background: var(--surface); border: 2px solid var(--brand);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font: 700 15px/1 var(--display); color: var(--ink);
}
.steps strong {
  display: block; font-size: 18px; margin-bottom: 4px; color: var(--ink);
}

.table-wrap {
  overflow-x: auto; margin: 20px 0; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th {
  text-align: left; font: 600 12px/1.2 var(--mono); letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); padding: 12px 14px;
  border-bottom: 1px solid var(--line); background: rgba(0,0,0,0.02);
}
td {
  padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
td.n, th.n {
  text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap;
}
tfoot td {
  font-weight: 700; background: rgba(0,0,0,0.02); border-top: 2px solid var(--line);
}

.app-card {
  background: var(--surface); border: 2px solid var(--brand); border-radius: 16px;
  padding: 28px 24px; margin: 32px 0; box-shadow: 0 8px 24px rgba(0,0,0,0.05);
}
.app-card h3 {
  font-size: 20px; font-weight: 800; margin-top: 0; margin-bottom: 12px;
}
.app-card ul { margin: 0 0 16px; padding-left: 20px; }
.app-card li { margin-bottom: 8px; }

.questions { display: grid; gap: 12px; margin: 24px 0; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; transition: border-color 150ms ease;
}
.faq-item[open] { border-color: var(--brand); }
.faq-item summary {
  font: 700 16px/1.4 var(--body); color: var(--ink); padding: 16px 20px;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font: 700 20px/1 var(--display); color: var(--muted);
  transition: transform 150ms ease;
}
.faq-item[open] summary::after { content: "−"; color: var(--accent); }
.faq-item summary:hover { background: rgba(0, 0, 0, 0.015); }
.faq-item .faq-body {
  padding: 0 20px 20px; color: var(--muted); font-size: 15px; line-height: 1.6;
}
.faq-item .faq-body p:last-child { margin-bottom: 0; }

.guide-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px; margin: 24px 0;
}
.guide-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; text-decoration: none; color: inherit; display: flex;
  flex-direction: column; gap: 8px;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.guide-card:hover {
  transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.guide-card h3 { font-size: 17px; font-weight: 700; margin: 0; color: var(--ink); }
.guide-card p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }
.guide-card .link-arrow {
  font-size: 14px; font-weight: 700; color: var(--accent); margin-top: auto; padding-top: 8px;
}

.more-guides-section { margin-top: 48px; }
.more-guides-list { display: grid; gap: 10px; margin-top: 16px; }
.more-guide-link {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px;
  transition: border-color 120ms ease;
}
.more-guide-link:hover { border-color: var(--brand); color: var(--accent); }
.more-guide-link span:last-child { color: var(--muted); font-weight: 400; font-size: 14px; }

footer { border-top: 1px solid var(--line); margin-top: 56px; }
footer .wrap {
  padding-block: 36px 48px; color: var(--muted); font-size: 14px;
  display: flex; flex-direction: column; gap: 20px;
}
.footer-group { display: flex; flex-direction: column; gap: 10px; }
.footer-title {
  font-weight: 700; color: var(--ink); text-transform: uppercase;
  font-size: 12px; letter-spacing: 0.05em; font-family: var(--mono);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.footer-links a, .footer-bottom a { color: var(--muted); text-decoration: none; }
.footer-links a:hover, .footer-bottom a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line);
}

@media (max-width: 600px) {
  .top { flex-wrap: wrap; }
  .guide-header h1 { font-size: 26px; }
  .steps > li { padding-left: 40px; }
  .steps > li::before { width: 28px; height: 28px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .guide-card { transition: none; }
  .btn:hover, .guide-card:hover { transform: none; }
}

/* Interactive estimating widget (single calculator and tabs) */
.try-it-section { margin-top: 48px; margin-bottom: 32px; }
.estimate-tabs-wrap { margin-top: 32px; width: 100%; min-width: 0; }
.estimate-tablist {
  display: flex; gap: 8px; overflow-x: auto; white-space: nowrap;
  padding-bottom: 12px; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; max-width: 100%;
}
.estimate-tablist::-webkit-scrollbar { height: 4px; }
.estimate-tablist::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.estimate-tablist .boq-tab {
  flex-shrink: 0; background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font: 600 14px/1 var(--body); padding: 9px 16px;
  border-radius: 999px; cursor: pointer; transition: all 120ms ease;
}
.estimate-tablist .boq-tab:hover { color: var(--ink); border-color: var(--brand); }
.estimate-tablist .boq-tab.active,
.estimate-tablist .boq-tab[aria-selected="true"] {
  background: var(--brand); color: #1C1917; border-color: var(--brand); font-weight: 700;
}
.estimate-panel { margin-top: 0; }
.estimate-panel[hidden] { display: none !important; }
.quick-calc-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 32px; margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}
.calc-controls-wrap { min-width: 0; }
.calc-controls { display: grid; gap: 18px; }
.calc-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.calc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.calc-field.wide { grid-column: 1 / -1; }
.calc-field label { font-size: 14px; font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; align-items: baseline; }
.calc-field input {
  width: 100%; font: 400 16px/1.4 var(--body); color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
.calc-field input:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.calc-hint { font-size: 12px; color: var(--muted); min-height: 16px; }
.calc-hint.error { color: var(--bad); font-weight: 600; }
.calc-field-static-label { font-size: 14px; font-weight: 700; color: var(--ink); }
.calc-static-text { font-size: 13px; color: var(--muted); margin: 0; }

.calc-btn-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.calc-opt-btn {
  flex: 1; min-width: 70px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: 600 13px/1.2 var(--body); cursor: pointer; text-align: center;
  transition: all 120ms ease;
}
.calc-opt-btn:hover { border-color: var(--brand); }
.calc-opt-btn.active, .calc-opt-btn[aria-pressed="true"] {
  background: var(--brand); color: #1C1917; border-color: var(--brand); font-weight: 700;
}

.calc-result-card {
  background: var(--board); color: var(--on-board); border-radius: 16px; padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
}
.calc-result-head { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.calc-result-tag { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand); }
.calc-table-wrap { overflow-x: auto; width: 100%; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.calc-table th {
  text-align: left; font: 600 11px/1.2 var(--mono); letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--on-board-muted); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--board-line);
}
.calc-table td {
  padding: 9px 10px 9px 0; border-bottom: 1px solid var(--board-line); vertical-align: top; color: var(--on-board);
}
.calc-table tr:last-child td { border-bottom: 0; }
.calc-table td.n, .calc-table th.n {
  text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap;
  font-weight: 700; color: var(--brand);
}
.calc-table tr.detail-row td { font-size: 13px; color: var(--on-board-muted); padding-block: 4px 6px; }
.calc-table tr.detail-row td.n { color: var(--on-board-muted); font-weight: 400; }
.calc-note { font-size: 13px; color: var(--on-board-muted); margin: 6px 0 0; font-style: italic; }

.calc-result-foot { display: flex; flex-direction: column; gap: 12px; }
.calc-result-note { font-size: 13px; color: var(--on-board-muted); line-height: 1.45; margin: 0; }
.calc-result-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.calc-result-actions .btn { width: 100%; text-align: center; }
.calc-result-actions .btn-ghost {
  color: var(--on-board); border-color: var(--board-line); background: transparent;
}
.calc-result-actions .btn-ghost:hover {
  border-color: var(--brand); color: var(--brand);
}

@media (max-width: 880px) {
  .quick-calc-box { grid-template-columns: minmax(0, 1fr); padding: 20px; }
}
@media (max-width: 600px) {
  .calc-field-grid { grid-template-columns: minmax(0, 1fr); }
  .quick-calc-box { padding: 16px; border-radius: 14px; }
}


/* App screenshots on the feature pages: a desktop view beside a phone view. */
.shots {
  display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
  gap: 16px; align-items: start; margin: 20px 0 28px;
}
.shots figure, .shot { margin: 0; }
.shots img, .shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.shots figcaption, .shot figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.shot { max-width: 520px; margin: 20px 0 28px; }
.shot-wide { max-width: none; }
@media (max-width: 640px) {
  .shots { grid-template-columns: 1fr; }
  .shots figure:last-child { max-width: 280px; }
}

/* The features page: a jump menu, plan badges and one section per feature. */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 32px; }
.jump a {
  font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 14px;
}
.jump a:hover { border-color: var(--brand); color: var(--accent); }
.feature { scroll-margin-top: 16px; padding-top: 8px; }
.feature + .feature { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 32px; }
.feature-plan { margin: 4px 0 12px; }
.plan-badge {
  display: inline-block; font: 600 12px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: 999px; padding: 6px 10px; border: 1px solid var(--line); color: var(--ink);
}
.plan-badge.free { border-color: #15803D; }
.plan-badge.biz { border-color: var(--brand); background: var(--surface); }
.feature-more { font-weight: 600; }
.shot-phone { max-width: 280px; }
.shots-2p { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 580px; }
@media (max-width: 640px) {
  .shots-2p { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .shots-2p figure:last-child { max-width: none; }
}

/* Link to the same guide in the other language. */
.lang-switch { margin-top: 12px; font-size: 15px; font-weight: 600; }
