/* NearFind — shared web styles (t17). Zero frameworks, zero trackers.
   Brand: "hot/cold" proximity finding. Cold indigo -> warm signal accent.
   Accessibility: WCAG AA contrast, focus-visible, reduced-motion, responsive. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --ink: #0f172a;          /* slate-900 */
  --ink-soft: #475569;     /* slate-600 */
  --line: #e2e8f0;         /* slate-200 */
  --brand: #2f4bd8;        /* confident indigo (cold) */
  --brand-ink: #ffffff;
  --hot: #e2542c;          /* warm signal accent (hot) */
  --cold: #2f80d8;
  --ok: #0f9d58;
  --radius: 14px;
  --maxw: 940px;
  --shadow: 0 6px 24px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--hot);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link (a11y) — 逻辑属性，RTL（如 ar）自动镜像 */
.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100;
  border-end-end-radius: 8px;
}
.skip-link:focus { inset-inline-start: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Site header */
.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky; top: 0; z-index: 10;
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; color: var(--ink); letter-spacing: -.2px;
}
.brand:hover { text-decoration: none; }
.brand .dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--hot), var(--brand));
  box-shadow: 0 0 0 4px rgba(47,75,216,.12); flex: none;
}
.nav { display: flex; gap: 20px; align-items: center; font-size: 15px; }
.nav a { color: var(--ink-soft); font-weight: 600; }
.nav a:hover { color: var(--ink); }

/* Hero */
.hero { padding: 72px 0 56px; text-align: center; }
.hero h1 {
  font-size: clamp(30px, 6vw, 52px); line-height: 1.08; margin: 0 0 16px;
  letter-spacing: -1px; font-weight: 800;
}
.hero .tagline {
  font-size: clamp(17px, 2.6vw, 21px); color: var(--ink-soft);
  max-width: 620px; margin: 0 auto 12px;
}
.grad {
  background: linear-gradient(90deg, var(--cold), var(--brand) 45%, var(--hot));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pill {
  display: inline-block; margin: 18px auto 0; padding: 8px 16px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-soft); font-size: 14px; font-weight: 600;
}
.cta-row {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 12px; font-weight: 700; font-size: 16px;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: var(--shadow); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.store-badge { height: 52px; width: auto; }

/* Sections */
section { padding: 44px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(23px, 4vw, 32px); letter-spacing: -.5px; margin: 0 0 8px; font-weight: 800; }
h3 { font-size: 19px; margin: 26px 0 6px; font-weight: 700; }
.lede { color: var(--ink-soft); font-size: 18px; max-width: 680px; margin: 0 0 24px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card .ico { font-size: 26px; line-height: 1; margin-bottom: 10px; display: block; }

/* Honesty banner (expectation management = review/refund protection) */
.honest {
  border-inline-start: 5px solid var(--hot); background: #fff6f2;
  padding: 18px 20px; border-start-end-radius: 12px; border-end-end-radius: 12px;
  margin: 8px 0 4px;
}
.honest strong { color: var(--hot); }

/* Prose (legal pages) */
.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin-top: 34px; }
.prose h3 { font-size: 18px; }
.prose ul { padding-inline-start: 22px; }
.prose li { margin: 6px 0; }
.prose p { margin: 12px 0; }
.updated {
  color: var(--ink-soft); font-size: 14px; border: 1px solid var(--line);
  background: var(--bg-soft); padding: 10px 14px; border-radius: 10px; display: inline-block;
}
.tldr {
  background: #eef2ff; border: 1px solid #dbe1ff; border-radius: var(--radius);
  padding: 20px 22px; margin: 20px 0;
}
.tldr h2 { margin-top: 0; font-size: 20px; }
table.data { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
table.data th, table.data td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; vertical-align: top; }
table.data th { background: var(--bg-soft); font-weight: 700; }

/* FAQ */
details.faq { border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin: 10px 0; background: #fff; }
details.faq summary { font-weight: 700; cursor: pointer; padding: 12px 0; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "+ "; color: var(--hot); font-weight: 800; }
details.faq[open] summary::before { content: "– "; }
details.faq p { color: var(--ink-soft); margin: 0 0 14px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 34px 0; margin-top: 20px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.foot-links a { color: var(--ink-soft); font-weight: 600; }
.small { color: var(--ink-soft); font-size: 14px; }

/* ---- i18n (t20): language switcher / translation notice / CJK+DE typography ---- */
/* Header switcher: pure-CSS <details> dropdown, zero JS, compact so the 64px bar survives */
.lang-switch { position: relative; font-size: 14px; flex: none; }
.lang-switch > summary {
  list-style: none; cursor: pointer; padding: 7px 12px; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--ink-soft); font-weight: 700;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary::before { content: "\1F310\00a0"; }
.lang-switch[open] > summary { border-color: var(--brand); color: var(--ink); }
.lang-switch ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 20;
  margin: 0; padding: 6px; list-style: none; min-width: 194px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow);
}
.lang-switch li { margin: 0; }
.lang-switch a, .lang-switch span[aria-current] {
  display: block; padding: 8px 10px; border-radius: 8px;
  color: var(--ink); font-weight: 600;
}
.lang-switch a:hover { background: var(--bg-soft); text-decoration: none; }
.lang-switch span[aria-current] { color: var(--brand); background: #eef2ff; }

/* Footer switcher: own row (order 3) so the existing two-item layout is untouched */
.lang-switch-foot { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; flex: 0 0 100%; order: 3; }
.lang-switch-foot a { color: var(--ink-soft); font-weight: 600; }
.lang-switch-foot span[aria-current] { color: var(--ink); font-weight: 800; }

/* "English version governs" notice on translated legal pages (spec D7) */
.notice {
  border-inline-start: 5px solid var(--cold); background: #f2f7ff; color: var(--ink-soft);
  padding: 12px 16px; border-start-end-radius: 12px; border-end-end-radius: 12px;
  margin: 16px 0 4px; font-size: 15px;
}

/* Landing honesty banner wraps its text in <p> (so i18n can extract it) — kill default margins */
.honest p { margin: 0; }
.honest p + p { margin-top: 10px; }

/* Overflow protection: German compound words + CJK unspaced text (spec D9/A5) */
body { overflow-wrap: break-word; }
html[lang="de"] body { hyphens: auto; }
html[lang="ja"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
  line-height: 1.85; letter-spacing: .01em;
}
html[lang="ja"] .hero h1, html[lang="ja"] h2 { letter-spacing: 0; line-height: 1.4; }
html[lang="ja"] .hero .tagline, html[lang="ja"] .lede { line-height: 1.9; }
html[lang="ko"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", sans-serif;
  line-height: 1.8;
}
html[lang="zh"] body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.85; letter-spacing: .01em;
}
html[lang="zh"] .hero h1, html[lang="zh"] h2 { letter-spacing: 0; line-height: 1.4; }
/* Arabic (RTL): dir="rtl" 镜像由逻辑属性自动处理，这里只管字体与行高 */
html[lang="ar"] body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma,
    "Noto Sans Arabic", "Geeza Pro", sans-serif;
  line-height: 1.9;
}
html[lang="ar"] .hero h1, html[lang="ar"] h2 { line-height: 1.5; }
html[lang="ar"] .hero .tagline, html[lang="ar"] .lede { line-height: 2; }

@media (max-width: 760px) {
  .site-head .wrap {
    height: auto; min-height: 64px; flex-wrap: wrap;
    padding-top: 10px; padding-bottom: 10px;
  }
  .nav { gap: 14px; font-size: 14px; }
  .lang-switch { order: 3; }
}

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