:root {
    color-scheme: light;
    --ink: #1f1f1f; --muted: #444746; --line: #dde3ea; --line-strong: #7c8794;
    --paper: #ffffff; --bg: #f8fafd; --surface: #f0f4f9;
    --brand: #0b57d0; --brand-hover: #0842a0; --brand-ink: #ffffff; --brand-soft: #e8f0fe;
    --call: #137333; --call-hover: #0d5a27;
    --danger: #b42318; --danger-soft: #fdecea;
    --warn: #8a5a00; --warn-soft: #fff5db; --ok: #137333;
    --radius: 12px; --gutter: clamp(20px, 4vw, 48px);
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 94px; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.3; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 11; padding: 8px 12px; background: var(--paper); }
.skip-link:not(:focus) { clip-path: inset(50%); }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.page { padding-top: 32px; padding-bottom: 24px; }
.page h1 { font-size: clamp(26px, 4vw, 36px); margin: 8px 0 12px; letter-spacing: -.02em; }
.page h2 { font-size: 21px; margin: 32px 0 10px; }
.page h3 { font-size: 17px; margin: 22px 0 6px; }
.muted { color: var(--muted); font-size: 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 62ch; }
code { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; word-break: break-all; font-size: .92em; }

/* header and footer */
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 12px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; flex: none; border-radius: 8px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; }
.brand-text { font-weight: 700; font-size: 20px; letter-spacing: -.03em; }
.topnav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 30px); flex-wrap: wrap; }
.topnav a:not(.btn) { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--muted); }
.topnav a:not(.btn):hover { color: var(--brand); text-decoration: underline; }

/* language menu in the top bar: a button with the current language, a list of all of them below it */
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted);
    padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); margin-inline-start: 2px; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--brand); border-color: var(--brand); }
.lang-menu summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.lang-menu ul { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none;
    background: var(--paper); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    display: grid; grid-template-columns: repeat(2, minmax(9em, 1fr)); gap: 2px; max-height: min(70vh, 480px); overflow-y: auto; }
.lang-menu li a { display: block; padding: 6px 10px; border-radius: 4px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.lang-menu li a:hover, .lang-menu li a:focus-visible { background: var(--surface); color: var(--brand); text-decoration: none; }
.lang-menu li a[aria-current] { font-weight: 700; color: var(--brand); }
@media (max-width: 560px) { .lang-menu ul { position: fixed; inset-inline: 16px; top: 64px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 0; }
button.link:hover { color: var(--brand); text-decoration: underline; background: none; }
.footer { margin-top: 64px; padding: 36px 0 28px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); background: var(--surface); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-bottom: 24px; }
.footer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin: 0 0 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 6px 0; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-note { border-top: 1px solid var(--line); padding-top: 16px; margin: 0; font-size: 13px; }
.footer-more { border-top: 1px solid var(--line); padding-top: 18px; }
.footer-more li { overflow-wrap: anywhere; }
.footer-more a { color: var(--ink); text-decoration: underline; }
.footer-brand { margin: 12px 0 0; font-size: 13px; }
.footer-brand a { color: var(--ink); text-decoration: underline; }

/* buttons */
.btn, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 42px; padding: 8px 18px; }
.btn, button[type=submit]:not(.link) { background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); }
.btn:hover, button[type=submit]:not(.link):hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn-secondary { background: var(--paper); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-secondary:hover { background: var(--surface); }
.btn-small, .btn.small { min-height: 36px; padding: 4px 14px; font-size: 14px; }
.btn-large { min-height: 50px; padding: 10px 22px; font-size: 16px; }
.btn.danger { background: var(--paper); color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
form > .btn, form > button[type=submit]:not(.link):not(.small) { margin-top: 14px; }

/* landing */
.hero { padding: 56px 0 64px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 400px); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .hero { padding: 32px 0 40px; } .hero-inner { grid-template-columns: 1fr; } }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--brand); font-weight: 700; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; margin: 0 0 16px; }
.eyebrow::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.hero h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.12; letter-spacing: -.04em; margin: 0 0 18px; }
.hero h1 span { display: block; color: var(--brand); }
.hero .lead { margin: 0 0 24px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: var(--muted); }
.checks li::before { content: "\2713"; color: var(--ok); font-weight: 700; margin-right: 7px; }
.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section.alt { background: var(--paper); }
.section h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; margin: 0 0 8px; }
.section-lead { color: var(--muted); margin: 0 0 28px; max-width: 70ch; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.tile-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.section.alt .tile-card { background: var(--bg); }
.tile-card h3 { margin: 0 0 6px; font-size: 17px; }
.tile-card p { margin: 0; color: var(--muted); font-size: 15px; }
.step-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 700; margin-bottom: 12px; }
a.tile-card { text-decoration: none; color: inherit; display: block; }
a.tile-card:hover { border-color: var(--brand); }
a.tile-card h3 { color: var(--brand); }
.section-more { margin: 20px 0 0; font-weight: 600; }
details.qa { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin: 0 0 10px; max-width: 860px; }
details.qa summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
details.qa p { margin: 0 0 14px; color: var(--muted); }

/* dial pad */
.dialer { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 10px 30px rgba(15, 40, 90, .08); }
.dialer-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.dialer .balance { display: flex; gap: 8px; align-items: baseline; margin-bottom: 10px; font-size: 15px; }
.dialer .balance a { margin-left: auto; }
.dialer input { width: 100%; font: inherit; font-size: 22px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; }
.quote { min-height: 3em; margin: 10px 0; font-size: 15px; color: var(--muted); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keys button { font: inherit; font-size: 20px; min-height: 52px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.keys button:hover { border-color: var(--line-strong); }
.keys button:active { background: var(--line); }
.call { width: 100%; margin-top: 12px; min-height: 52px; font: inherit; font-size: 17px; font-weight: 700; color: #fff; background: var(--call); border: 0; border-radius: 10px; cursor: pointer; }
.call:hover:not(:disabled) { background: var(--call-hover); }
.call:disabled { opacity: .45; cursor: default; }
.call.hangup { background: var(--danger); }
h2.faq-q { font-size: 18px; margin: 24px 0 6px; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.quick button, .recent-list button { font: inherit; font-size: 13px; min-height: 36px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
.quick button:hover, .recent-list button:hover { border-color: var(--line-strong); }
.in-call .quick, .in-call .recent, .in-call .dial-help, .in-call .save-number { display: none; }
.quote.warning { color: var(--warn); font-weight: 700; }
.mute { width: 100%; margin-top: 8px; min-height: 44px; font: inherit; font-weight: 600; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; }
.mute.on { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
.mute[hidden], .recent[hidden] { display: none; }
.recent { margin-top: 10px; }
.recent p { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.recent-list { display: flex; flex-wrap: wrap; gap: 6px; }
.save-number { margin-top: 10px; }
.save-number[hidden], #save-form[hidden], #save-open[hidden] { display: none; }
.link-button { font: inherit; font-size: 14px; min-height: 36px; padding: 4px 2px; color: var(--brand); background: none; border: 0; text-decoration: underline; cursor: pointer; }
#save-form { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
#save-form label { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: var(--muted); }
.dialer #save-name { font-size: 16px; padding: 8px 10px; min-width: 0; }
.contact-list { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.contact-list li { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--line); }
.contact-use { flex: 1; min-width: 0; min-height: 44px; display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 6px 2px; font: inherit; font-size: 14px; color: var(--ink); text-align: start; background: none; border: 0; cursor: pointer; }
.contact-use span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-use bdi { flex: none; color: var(--muted); font-size: 13px; }
.contact-remove { width: 36px; height: 36px; flex: none; font-size: 20px; line-height: 1; color: var(--muted); background: none; border: 0; border-radius: 6px; cursor: pointer; }
.contact-remove:hover { color: var(--danger); background: var(--surface); }
.saved-note { margin: 6px 0 0 !important; font-weight: 400 !important; font-size: 12px !important; }
.dial-help[hidden] { display: none; }
.dial-help { margin: 10px 0 0; text-align: center; font-size: 14px; }
.status { min-height: 1.6em; margin-top: 10px; text-align: center; font-variant-numeric: tabular-nums; font-size: 15px; }
.notice { margin: 0 0 12px; padding: 10px 14px; background: var(--warn-soft); border-radius: 8px; font-size: 14px; color: var(--warn); }

/* articles and guides */
.article { max-width: 780px; }
.breadcrumb { font-size: 14px; color: var(--muted); margin: 0 0 4px; }
.answer-box { border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; margin: 0 0 24px; }
.answer-box p { margin: 0; }
.guide-list { list-style: none; padding: 0; margin: 0; }
.guide-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.guide-list a { font-weight: 600; }
.guide-list span { display: block; font-size: 14px; color: var(--muted); }
.article-cta { margin-top: 36px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.article-cta p { margin: 0; font-weight: 600; }

/* cards, forms, tables */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 16px 0; }
.narrow { max-width: 480px; margin-inline: auto; }
.narrow h1 { font-size: 26px; margin: 0 0 8px; }
label { display: block; font-weight: 600; font-size: 15px; margin: 12px 0 4px; }
input[type=email], input[type=tel], input[type=text], input[type=search], input[type=number], select, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 11px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface); font-size: 14px; color: var(--muted); }
.packs { display: flex; gap: 10px; flex-wrap: wrap; }
.packs label { margin: 0; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; background: var(--paper); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }
.err { color: var(--danger); font-weight: 600; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.row input { width: auto; flex: 1 1 160px; }

/* admin monitor */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--ok); border-radius: 10px; padding: 12px 14px; }
.tile.bad { border-left-color: var(--danger); background: var(--danger-soft); }
.tile-label { font-size: 13px; color: var(--muted); }
.tile-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile.bad .tile-value { color: var(--danger); }
.tile-note { font-size: 13px; color: var(--muted); }

/* four-card rows: 4 across on wide screens, 2 by 2 in between, one column on phones */
.grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1000px) { .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid.four { grid-template-columns: 1fr; } .topbar-inner { min-height: 60px; } .topnav { gap: 6px 14px; } .topnav a:not(.btn) { display: inline-block; padding: 11px 0; } }

/* tools: call cost calculator and microphone test */
.calc-result { font-size: 20px; font-weight: 700; margin: 16px 0; }
.besttime label { display: block; margin-top: 12px; }
.bt-table { width: 100%; border-collapse: collapse; }
span[dir="ltr"] { white-space: nowrap; }
.codes-table { max-height: 480px; overflow-y: auto; margin-top: 12px; }
.codes-table thead th { position: sticky; top: 0; background: var(--paper); }
.codes-table td[dir="ltr"] { white-space: nowrap; }
#codes input[type="search"] { width: 100%; }
.bt-table th, .bt-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.bt-night td:last-child { color: var(--muted, #6b7280); }
.mic-meter { height: 18px; margin: 16px 0 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; }
.mic-meter span { display: block; height: 100%; width: 0; background: var(--brand); transition: width 60ms linear; }
.mic .btn-secondary { margin-left: 8px; }
[hidden] { display: none !important; }
.group-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.group-jump a { padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-size: 14px; }
.group-jump a:hover { background: var(--surface); }
.article h2[id] { scroll-margin-top: 80px; }
.guide-search { margin: 0 0 16px; max-width: 520px; }
.guide-search label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
.guide-list li[hidden], .guide-list[hidden], .group-jump[hidden] { display: none; }
/* On a phone the section links are one row to swipe through, so the first guide is on the first screen. */
@media (max-width: 640px) {
  .group-jump { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; padding: 2px 2px 10px; margin-inline: -2px; }
  .group-jump a { flex: none; white-space: nowrap; }
}

/* languages */
.languages { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 24px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.languages a { color: inherit; text-decoration: none; }
.languages a:hover { text-decoration: underline; }
.languages a[aria-current] { font-weight: 700; }
/* Japanese and Korean need their own font families: the Chinese ones draw shared characters in Chinese forms. */
html:lang(ja) { --font: "Segoe UI", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif; }
html:lang(ko) { --font: "Segoe UI", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
[dir=rtl] th, [dir=rtl] td { text-align: right; }
[dir=rtl] .answer-box { border-left: 0; border-right: 4px solid var(--brand); border-radius: var(--radius) 0 0 var(--radius); }

/* In right-to-left articles, a phone number at the start of a list item keeps its own left-to-right order. */
html[dir=rtl] .article li > strong:first-child { direction: ltr; unicode-bidi: isolate; }
