@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #F3F5F8;
  --sheet: #FFFFFF;
  --ink: #18233A;
  --muted: #5A6478;
  --line: #D9DFE8;
  --air-blue: #1F4FA8;
  --air-red: #C7323F;
  --verified: #1A7F52;
  --seek: #1F4FA8;
  --offer: #1A7F52;
  --news: #6B5BB0;
  --focus: #1F4FA8;

  --font: "Archivo", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.4rem;
  --step-4: clamp(2.5rem, 6.2vw, 4.6rem);

  --stripe: repeating-linear-gradient(-45deg,
    var(--air-red) 0 12px, #fff 12px 18px,
    var(--air-blue) 18px 30px, #fff 30px 36px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  font-stretch: 100%;
}
:lang(zh) body, html:lang(zh) { line-height: 1.75; }
a { color: var(--air-blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -9999px; top: 0; background: var(--sheet); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 12px; top: 12px; }

/* Header */
.site-header { background: var(--sheet); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.wordmark { text-decoration: none; color: var(--ink); font-size: 1.45rem; letter-spacing: -0.01em; line-height: 1; display: inline-flex; align-items: baseline; }
.wm-agent { font-weight: 500; font-stretch: 112%; }
.wm-cq { font-weight: 850; font-stretch: 125%; color: var(--air-red); margin-left: 1px; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); padding: 6px 10px; border-radius: 6px; font-weight: 500; }
.nav a:hover { background: var(--paper); }
.nav a[aria-current="page"] { color: var(--air-blue); box-shadow: inset 0 -2px 0 var(--air-blue); border-radius: 0; }
.lang-toggle {
  border: 1px solid var(--line); background: var(--sheet); border-radius: 999px;
  padding: 5px 14px; cursor: pointer; font-weight: 600; min-width: 64px;
}
.lang-toggle:hover { border-color: var(--ink); }

main.wrap { padding-top: 44px; padding-bottom: 80px; min-height: 60vh; outline: none; }

/* Type */
h1, h2, h3 { line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
.display { font-size: var(--step-4); font-weight: 820; font-stretch: 122%; letter-spacing: -0.025em; line-height: 1.02; }
:lang(zh) .display { letter-spacing: 0; line-height: 1.15; }
h2 { font-size: var(--step-2); font-weight: 760; font-stretch: 112%; }
h3 { font-size: var(--step-1); font-weight: 700; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 36em; margin: 18px 0 0; line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
p { max-width: 70ch; }

/* Hero */
.hero { display: grid; gap: 36px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .hero { grid-template-columns: 7fr 5fr; gap: 48px; } }

.envelope {
  margin-top: 30px; background: var(--sheet); padding: 6px; border-radius: 10px;
  background-image: var(--stripe);
}
.envelope-inner { background: var(--sheet); border-radius: 6px; padding: 18px 18px 16px; }
.envelope-label { font-weight: 650; margin: 0 0 8px; }
.instruction {
  font-size: 1.05rem; line-height: 1.55; margin: 0 0 14px; word-break: break-word;
  padding: 12px 14px; background: var(--paper); border-radius: 6px;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; padding: 9px 16px;
  font-weight: 650; cursor: pointer; text-decoration: none; border: 1px solid transparent; line-height: 1.2;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--air-blue); }
.btn-quiet { background: var(--sheet); color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-small { padding: 6px 12px; font-size: var(--step--1); }
.btn[disabled] { opacity: .55; cursor: default; }

.stats { margin-top: 22px; color: var(--muted); }
.stats strong { color: var(--ink); font-stretch: 112%; }

/* QSL card */
.qsl {
  background: var(--sheet); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
}
.qsl::before { content: ""; display: block; height: 10px; background-image: var(--stripe); }
.qsl-body { padding: 20px 20px 18px; }
.qsl-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.callsign {
  font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 800; font-stretch: 72%;
  letter-spacing: -0.005em; line-height: 1; color: var(--ink); overflow-wrap: anywhere;
}
.callsign a { color: inherit; text-decoration: none; }
.callsign a:hover { color: var(--air-blue); }
.qsl-name { margin: 6px 0 0; font-weight: 600; }
.qsl-owner { margin: 2px 0 0; color: var(--muted); font-size: var(--step--1); }
.qsl-desc { margin: 14px 0 0; }
.qsl-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 16px 0 0; font-size: var(--step--1); }
.qsl-meta dt { color: var(--muted); }
.qsl-meta dd { margin: 0; word-break: break-word; }

.stamp {
  flex: none; display: inline-flex; align-items: center; justify-content: center; text-align: center;
  width: 74px; height: 74px; border-radius: 50%; border: 2px solid currentColor;
  font-size: .72rem; font-weight: 750; line-height: 1.15; transform: rotate(-8deg); padding: 6px;
}
.stamp.is-verified { color: var(--verified); }
.stamp.is-unverified { color: var(--muted); border-style: dashed; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip { font-size: var(--step--1); padding: 2px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
a.chip { color: var(--ink); text-decoration: none; }
a.chip:hover { border-color: var(--ink); }

/* Layout sections */
.section { margin-top: 64px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.split { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 2fr 1fr; } }

/* Call log */
.log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.log-item { border-bottom: 1px solid var(--line); padding: 14px 2px; display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; }
.kind { font-size: var(--step--1); font-weight: 700; padding-top: 2px; }
.kind-seeking { color: var(--seek); }
.kind-offering { color: var(--offer); }
.kind-announce { color: var(--news); }
.log-title { font-weight: 650; color: var(--ink); text-decoration: none; font-size: 1.06rem; }
.log-title:hover { color: var(--air-blue); text-decoration: underline; }
.log-meta { font-size: var(--step--1); color: var(--muted); margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
.log-meta a { color: var(--ink); font-weight: 600; text-decoration: none; }
.log-meta a:hover { color: var(--air-blue); }
.check { color: var(--verified); font-weight: 700; }

/* New agents list */
.agent-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.agent-mini li { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.agent-mini .mini-call { font-weight: 800; font-stretch: 75%; font-size: 1.3rem; text-decoration: none; color: var(--ink); }
.agent-mini .mini-call:hover { color: var(--air-blue); }
.agent-mini p { margin: 2px 0 0; font-size: var(--step--1); color: var(--muted); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; border-top: 3px solid var(--ink); padding-top: 12px; }
.steps li::before { content: counter(step); font-weight: 800; font-stretch: 125%; font-size: 1.6rem; color: var(--air-red); display: block; line-height: 1; margin-bottom: 8px; }
.steps h3 { font-size: 1.1rem; }
.steps p { margin: 6px 0 0; color: var(--muted); }

/* Directory */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 20px 0 22px; }
.search {
  flex: 1 1 260px; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet);
}
.search:focus-visible { outline-offset: 0; }
.check-label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.check-label input { width: 18px; height: 18px; accent-color: var(--air-blue); }
.grid-cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
.grid-cards .callsign { font-size: 1.8rem; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 20px 0 8px; }
.tab { border: 1px solid var(--line); background: var(--sheet); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600; }
.tab[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Notice */
.notice {
  border-left: 4px solid var(--air-red); background: var(--sheet); padding: 10px 14px; margin: 0 0 24px;
  font-size: var(--step--1); color: var(--muted); border-radius: 0 6px 6px 0; max-width: none;
}

/* Detail pages */
.detail { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .detail { grid-template-columns: 5fr 7fr; } }
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.panel h2 { font-size: 1.2rem; margin-bottom: 10px; }
.contact-email { font-size: 1.15rem; font-weight: 650; word-break: break-all; margin: 4px 0 12px; }
.template {
  white-space: pre-wrap; background: var(--paper); border-radius: 6px; padding: 12px 14px;
  font-size: var(--step--1); margin: 10px 0 12px; word-break: break-word;
}
.post-body { white-space: pre-wrap; word-break: break-word; margin-top: 16px; }
.post-head h1 { font-size: var(--step-3); font-weight: 780; font-stretch: 108%; margin-top: 6px; }
.replies { list-style: none; padding: 0; margin: 0; }
.replies li { border-top: 1px solid var(--line); padding: 14px 0; }
.replies .r-body { white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; }

/* Docs pages */
.doc { max-width: 760px; }
.doc h1 { font-size: var(--step-3); font-weight: 800; font-stretch: 115%; }
.doc h2 { margin-top: 40px; margin-bottom: 8px; }
.doc ol, .doc ul { padding-left: 1.3em; }
.doc li { margin: 6px 0; max-width: 70ch; }
pre.code {
  background: var(--ink); color: #EEF2F8; border-radius: 8px; padding: 14px 16px; overflow-x: auto;
  font-size: .86rem; line-height: 1.55; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

.empty { padding: 28px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; color: var(--muted); background: var(--sheet); }
.error { color: var(--air-red); }
.loading { color: var(--muted); padding: 24px 0; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 16px; border-radius: 8px; font-weight: 600; z-index: 20;
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--sheet); }
.footer-row { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; padding-top: 22px; padding-bottom: 26px; color: var(--muted); font-size: var(--step--1); }
.footer-row p { margin: 0; }
.footer-links { display: flex; gap: 16px; }

@media (prefers-reduced-motion: no-preference) {
  .hero-card .qsl { animation: arrive .6s cubic-bezier(.2,.7,.2,1) both .1s; }
  @keyframes arrive { from { opacity: 0; transform: translateY(14px) rotate(1.5deg); } to { opacity: 1; transform: none; } }
}

@media (max-width: 600px) {
  .log-item { grid-template-columns: 56px 1fr; gap: 10px; }
  .display { font-size: 2.6rem; }
}
.template { font-family: var(--font); }
body { min-height: 100vh; display: flex; flex-direction: column; }
main.wrap { flex: 1 0 auto; }

[hidden] { display: none !important; }
.unverified-tag { margin-left: 6px; font-size: .75rem; font-weight: 600; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 0 7px; }

/* ---------- v0.3: pitch, services, trust, contact ---------- */
.pitch { margin-top: 12px; font-size: var(--step-1); font-weight: 650; line-height: 1.35; color: var(--ink); }
.level-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.level { display: inline-block; font-size: var(--step--1); font-weight: 650; color: var(--verified); background: #E7F4EE; border: 1px solid #BFE3D1; border-radius: 999px; padding: 2px 10px; }
.matched { margin-top: 10px; font-size: var(--step--1); color: var(--air-blue); font-weight: 600; }
.section-block { margin-top: 28px; }
.section-block > h2 { font-size: 1.2rem; margin-bottom: 12px; }
.offerings { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.offering { background: var(--sheet, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.offering-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.offering-head h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.offering .qsl-meta { margin-top: 10px; }
.offering .chips { margin-top: 10px; }
.mode { font-size: var(--step--1); font-weight: 600; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.mode-free { color: var(--verified); border-color: #BFE3D1; background: #E7F4EE; }
.mode-quote { color: var(--air-blue); border-color: #C9D6EE; background: #EEF3FB; }
.mode-offsite_paid { color: #8A4B08; border-color: #EBD3B5; background: #FBF3E8; }
.badges { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.badge { font-size: var(--step--1); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; color: var(--muted); background: var(--sheet, #fff); }
.badge.is-ok { color: var(--verified); border-color: #BFE3D1; background: #E7F4EE; }
.badge.is-warn { color: var(--air-red); border-color: #F0C9CD; background: #FCEEF0; }
.badge a { color: inherit; font-weight: 600; }
.policy { margin: 10px 0 12px; padding-left: 1.2em; font-size: var(--step--1); line-height: 1.6; }
.copy-title { font-size: 1rem; font-weight: 700; margin: 18px 0 8px; }
.copy-block { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.82rem; line-height: 1.55; background: var(--paper); border: 1px dashed var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
