/* Styles for the SEO content pages (niche pages, comparisons, guides) generated by site-i18n/pages.mjs.
   Colors and fonts come from tokens.css; the look follows the landing page (site/index.html). */
:root { --max: 1120px; --read: 720px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: 8px; top: 8px; transform: translateY(-200%); background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; margin: 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 247, 242, .86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.logo b { color: var(--accent); font-weight: inherit; }
.nav nav { display: flex; align-items: center; gap: 6px; }
.nav a.link { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; font-weight: 500; }
.nav a.link:hover, .nav a.link[aria-current] { background: var(--sand); color: var(--ink); }

/* Language menu (as on the landing page) */
.langmenu { position: relative; }
.langmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 999px; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary:hover, .langmenu[open] summary { background: var(--sand); color: var(--ink); }
.langmenu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; list-style: none; margin: 0; padding: 6px; min-width: 200px; max-height: min(70vh, 560px); overflow-y: auto; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.langmenu li a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.langmenu li a:hover { background: var(--sand); }
.langmenu li a[aria-current] { color: var(--accent); font-weight: 650; }
[dir="rtl"] .langmenu ul { right: auto; left: 0; }

/* Buttons */
.button { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; padding: 14px 24px; border-radius: 999px; text-decoration: none; font-weight: 650; font-size: 1rem; border: 0; cursor: pointer; transition: background .15s, transform .15s; box-shadow: 0 1px 2px rgba(147, 66, 31, .3), 0 6px 18px rgba(180, 83, 42, .25); }
.button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.button.small { padding: 9px 18px; font-size: .92rem; box-shadow: none; }
.button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.button.ghost:hover { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.button.light { background: #fff; color: var(--accent-dark); box-shadow: 0 6px 18px rgba(0, 0, 0, .15); }
.button.light:hover { background: var(--paper); }

/* Hero */
.page-hero { position: relative; overflow: hidden; padding: 40px 0 64px; border-bottom: 1px solid var(--line); }
.page-hero::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 640px; height: 640px; background: radial-gradient(closest-side, rgba(180, 83, 42, .12), transparent 70%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
.has-card .hero-grid { grid-template-columns: 1.15fr 1fr; }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); margin-bottom: 18px; max-width: 22ch; }
.kind-guide .page-hero h1, .kind-compare .page-hero h1, .kind-hub .page-hero h1 { max-width: 26ch; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 58ch; margin: 0 0 28px; }
.meta { color: var(--muted); font-size: .92rem; margin: -12px 0 26px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--ink-2); font-size: .94rem; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks svg { color: var(--ok); flex: none; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 22px; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* Certificate example in the hero */
.hero-card { display: flex; justify-content: center; }
.voucher { position: relative; width: min(100%, 430px); aspect-ratio: 1.62; border-radius: 18px; color: #fff; display: grid; grid-template-columns: 1fr 112px; transform: rotate(-3deg); box-shadow: var(--shadow-lg); background: linear-gradient(135deg, #c4602f 0%, #a2461f 55%, #7f3417 100%); overflow: hidden; }
.voucher::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 85% -10%, rgba(255, 255, 255, .22), transparent 45%), repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 9px); pointer-events: none; }
.v-main { padding: 24px 22px; display: flex; flex-direction: column; justify-content: space-between; }
.v-brand { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.v-title { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; margin-top: 6px; }
.v-item { font-size: .92rem; opacity: .92; margin-top: 4px; }
.v-amount { font-family: var(--serif); font-size: 2.5rem; line-height: 1; font-weight: 600; }
.v-to { font-size: .8rem; opacity: .85; margin-top: 6px; }
.v-stub { position: relative; border-left: 2px dashed rgba(255, 255, 255, .45); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; background: rgba(0, 0, 0, .08); }
.v-stub::before, .v-stub::after { content: ""; position: absolute; left: -13px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); }
.v-stub::before { top: -12px; }
.v-stub::after { bottom: -12px; }
.qr { background: #fff; padding: 7px; border-radius: 8px; width: 80px; height: 80px; color: var(--ink); }
.qr svg { width: 100%; height: 100%; }
.v-code { white-space: nowrap; font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; }
.voucher.teal { background: linear-gradient(135deg, #2f7d7a 0%, #1f5f63 55%, #164449 100%); }

/* Article body */
.content { padding-top: 56px; padding-bottom: 24px; }
.prose { max-width: var(--read); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.55rem, 3vw, 2rem); margin: 52px 0 14px; }
.prose h3 { font-family: var(--sans); font-size: 1.08rem; font-weight: 700; letter-spacing: 0; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 1.05rem; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); }
.prose strong, .prose b { color: var(--ink); }
.prose .note { color: var(--muted); font-size: .92rem; }

/* Wider blocks that break out of the reading column */
.wide { width: min(100vw - 48px, var(--max)); max-width: none; }
.cards { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); margin: 24px 0 32px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 0 0 6px; font-family: var(--sans); font-size: 1.02rem; font-weight: 700; letter-spacing: 0; }
.card p { margin: 0; color: var(--muted); font-size: .97rem; }
.card .ex { display: inline-block; margin-top: 14px; font-size: .84rem; color: var(--accent-dark); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }

.callout { background: var(--sand); border-radius: var(--radius); padding: 20px 24px; margin: 26px 0; }
.callout p:last-child { margin-bottom: 0; }
.callout.ok { background: var(--ok-soft); }
.callout.warn { background: var(--warn-soft); }
.callout strong { display: block; margin-bottom: 4px; }

.steps { list-style: none; padding: 0 !important; counter-reset: step; display: grid; gap: 14px; margin: 22px 0 28px !important; }
.steps > li { position: relative; padding: 18px 20px 18px 66px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 !important; }
.steps > li::before { counter-increment: step; content: counter(step); position: absolute; left: 20px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; display: grid; place-items: center; font-size: .95rem; }
.steps > li b { display: block; color: var(--ink); margin-bottom: 2px; }

.examples { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0 !important; margin: 18px 0 26px !important; }
.examples li { margin: 0 !important; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-size: .95rem !important; color: var(--ink-2); }
.examples li b { color: var(--accent-dark); font-weight: 650; }

.table { overflow-x: auto; margin: 22px 0 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.table table { width: 100%; border-collapse: collapse; font-size: .96rem; min-width: 540px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--line); }
.table thead th { border-top: 0; background: var(--sand); font-weight: 700; color: var(--ink); }
.table tbody th { font-weight: 650; color: var(--ink); }
.table td { color: var(--ink-2); }
.table .us { background: #fdf6f1; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Calculator */
.calc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 24px 0 32px; box-shadow: var(--shadow); }
.calc-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.calc label { display: block; font-size: .9rem; font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.calc input { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); }
.calc input:focus { outline: none; border-color: var(--accent); }
.calc-out { margin-top: 20px; }
.calc-out p { margin: 0 !important; }
.calc-sales { font-size: .95rem; color: var(--muted); }
.calc-sales span { color: var(--muted); }
.calc-sales b { color: var(--ink); font-weight: 650; }
/* The two ways of paying side by side, the cheaper one highlighted. */
.calc-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.calc-vs div { background: var(--paper); border: 1.5px solid transparent; border-radius: 12px; padding: 14px 16px; }
.calc-vs span { display: block; font-size: .84rem; color: var(--muted); }
.calc-vs b { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--ink); }
.calc-vs .win { background: var(--ok-soft); border-color: var(--ok); }
.calc-vs .win b { color: var(--ok); }
.calc-verdict { margin-top: 12px !important; font-weight: 650; color: var(--ok); }
.calc-verdict.less { color: var(--ink); }
.calc-verdict:empty { display: none; }
.calc-note { margin: 14px 0 0 !important; font-size: .88rem !important; color: var(--muted) !important; }

/* FAQ */
.faq { max-width: var(--read); margin-top: 64px; }
.faq h2, .related h2 { font-size: clamp(1.55rem, 3vw, 2rem); margin-bottom: 16px; }
.faq-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 24px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { list-style: none; cursor: pointer; font-weight: 650; padding: 18px 36px 18px 0; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s; }
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-list details p { color: var(--muted); margin: -4px 0 18px; }

/* Related pages and the guides hub */
.related { margin-top: 64px; }
.related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.related-list a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.related-list a:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-list .kind { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.related-list b { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.related-list a > span:last-child { color: var(--muted); font-size: .93rem; }
.prose .related-list { margin: 20px 0 40px; }
.kind-hub .prose { max-width: none; }
.kind-hub .prose h2:first-child { margin-top: 0; }
.prose .related-list li { margin: 0; }

/* Sign-up call to action */
.start { padding: 80px 0 56px; }
.signup { position: relative; overflow: hidden; border-radius: 24px; padding: 56px 40px; text-align: center; color: #fff; background: linear-gradient(135deg, #c4602f, #93421f); }
.signup::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 10px); pointer-events: none; }
.signup > * { position: relative; }
.signup h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.signup p { color: rgba(255, 255, 255, .88); max-width: 54ch; margin: 14px auto 28px; font-size: 1.08rem; }
.signup .button { margin: 0 auto; }
.demo-line { margin: 18px 0 0; font-size: .95rem; }
.signup .demo-line { margin: 20px auto 0; }
.signup .demo-line a { color: #fff; font-weight: 600; }

/* Footer */
footer { padding: 40px 0 48px; color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover, footer a[aria-current] { color: var(--ink); }
.resources { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px 48px; padding-bottom: 32px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.resources h2 { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; }
.resources ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; }
.footer-bottom nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-note { flex-basis: 100%; margin: 0; max-width: 72ch; font-size: .88rem; }

/* Scripts and directions other than Latin LTR (as on the landing page) */
:lang(ja) { --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif; --sans: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif; }
:lang(ko) { --serif: "AppleMyungjo", "Nanum Myeongjo", "Batang", serif; --sans: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
:lang(zh-Hant) { --serif: "Songti TC", "PMingLiU", serif; --sans: system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif; }
:lang(th) { --serif: system-ui, -apple-system, "Thonburi", "Leelawadee UI", "Tahoma", sans-serif; --sans: var(--serif); }
:lang(ar) { --serif: system-ui, -apple-system, "Geeza Pro", "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif; --sans: var(--serif); }
:lang(ar) :is(h1, h2, h3, .eyebrow, .button, .logo, .kind, .resources h2) { letter-spacing: 0; }
:lang(ar) :is(.eyebrow, .kind, .resources h2) { text-transform: none; }
:lang(he) { --serif: "Times New Roman", "David", serif; --sans: system-ui, -apple-system, "Segoe UI", "Arial Hebrew", Arial, sans-serif; }
:is(:lang(ja), :lang(ko), :lang(zh-Hant), :lang(th)) :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.3; }
:lang(ja) :is(h1, h2, h3) { word-break: auto-phrase; }
:lang(ko) :is(h1, h2, h3) { word-break: keep-all; }
:is(:lang(ja), :lang(ko), :lang(zh-Hant), :lang(th)) .eyebrow { letter-spacing: .04em; }
[dir="rtl"] .faq-list summary { padding: 18px 0 18px 36px; }
[dir="rtl"] .faq-list summary::after { right: auto; left: 4px; }
[dir="rtl"] .cta .button svg { transform: scaleX(-1); }
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol { padding-left: 0; padding-right: 24px; }
[dir="rtl"] .steps > li { padding: 18px 66px 18px 20px; }
[dir="rtl"] .steps > li::before { left: auto; right: 20px; }
[dir="rtl"] .table th, [dir="rtl"] .table td { text-align: right; }
[dir="rtl"] .table .num { text-align: left; }
[dir="rtl"] .crumbs li + li::before { margin-right: 0; margin-left: 6px; }

@media (max-width: 980px) {
  .has-card .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .related-list { grid-template-columns: 1fr 1fr; }
  .cards.three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav a.link { display: none; }
  .nav a.link.login { display: inline-block; padding: 8px 10px; }
  .cards, .cards.three, .related-list, .resources { grid-template-columns: 1fr; }
  .calc-inputs { grid-template-columns: 1fr; }
  .wide { width: 100%; }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 16px; }
  .page-hero { padding: 28px 0 48px; }
  .nav .button.small { padding: 8px 14px; font-size: .88rem; }
  .nav a.link.login { display: none; }
  .langmenu summary { padding: 8px; }
  .langmenu summary span { display: none; }
  .voucher { grid-template-columns: 1fr 88px; }
  .v-main { padding: 18px 16px; }
  .v-title { font-size: 1.25rem; }
  .v-amount { font-size: 2rem; }
  .qr { width: 62px; height: 62px; padding: 5px; }
  .signup { padding: 44px 20px; }
  .faq-list { padding: 2px 16px; }
  .steps > li { padding-left: 58px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
