/* 三亚市游艇进出口贸易协会 SYTA —— 站点样式
   配色严格取自协会 VI。CMYK 经 ICC 转 sRGB，并与 logo 源文件采样交叉核对。

     100/70/75/50  #0C2828  深色主色    顶栏、页脚、Hero 底
      85/42/54/0   #2A7371  中色        浅底上的正文链接（对白底 5.54，达标）
      75/10/45/0   #19A69A  亮色/logo色  强调线、按钮底（对白底 3.16，不可用于小字）
      55/0/55/0    #6EBD8C  渐变起
      85/15/30/0   #0096A2  渐变止

   无障碍：#19A69A 只用于装饰、边框、按钮底色和大字；正文与链接一律用 #2A7371 或更深。
   按钮为「深字压品牌色」（4.92 达标），不可反过来用白字（3.16 不达标）。 */

:root {
  --brand-900: #0C2828;
  --brand-700: #16403C;
  --brand-600: #1F5D5A;
  --brand-500: #2A7371;
  --brand:     #19A69A;
  --brand-300: #35C2B4;
  --brand-100: #DDEFEC;
  --brand-50:  #F2F8F7;

  --grad-a:    #6EBD8C;
  --grad-b:    #0096A2;

  --ink:      #16222E;
  --ink-mid:  #4A5B6B;
  --ink-soft: #71838F;
  --line:     #DCE7E5;
  --paper:    #FFFFFF;

  --ok:       #1D6F4F;
  --warn:     #8A6410;

  --wrap: 1140px;
  --radius: 3px;

  /* 字体策略见文件末尾「字体」一节。只用免费／开源或操作系统自带字体，不使用商业授权字体。 */
  --serif: "Source Serif 4", "Noto Serif CJK SC", "Source Han Serif SC",
           "Songti SC", Georgia, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans CJK SC",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 中文页不引用拉丁网页字体：中文标题本来就用中文字体渲染，
   若字体栈里留着 Source Serif 4，页面上的 SYTA / CE / OEM 这类拉丁字符
   会触发 122 KB 的字体下载。中文站访问者多在移动网络，这 122 KB 不该花。 */
html[lang="zh-Hans"] {
  --serif: "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

:lang(zh-Hans) body, html[lang="zh-Hans"] body { line-height: 1.8; }

a { color: var(--brand-500); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-600); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin: 2.4em 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.8em 0 .4em; }

p { margin: 0 0 1.05em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--brand-900); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
  background: var(--brand-900);
  color: #fff;
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.topbar__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }

.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; flex: 0 1 auto; }
.brand__mark { width: 46px; height: auto; flex: none; }
.brand__text {
  font-family: var(--serif); font-size: .95rem; line-height: 1.2;
  max-width: 25ch; letter-spacing: .01em;
}
/* CJK 字宽与 ch 单位不匹配，中文站名会被 21ch 从中间截断 */
html[lang="zh-Hans"] .brand__text { max-width: none; white-space: nowrap; }

.sitenav { margin-left: auto; }
.sitenav ul { display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.sitenav a {
  color: rgba(255,255,255,.82); text-decoration: none;
  font-size: .87rem; letter-spacing: .02em; white-space: nowrap;
  padding: .45rem 0; border-bottom: 2px solid transparent; display: block;
}
.sitenav a:hover { color: #fff; }
.sitenav a.is-active { color: #fff; border-bottom-color: var(--brand); }
.sitenav__lang a {
  border: 1px solid rgba(255,255,255,.28); border-radius: var(--radius);
  padding: .25rem .7rem; font-size: .8rem;
}
.sitenav__lang a:hover { border-color: var(--brand); color: var(--brand); }

.navtoggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; margin-left: auto; }
.navtoggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; }

/* ---------------------------------------------------------------- Hero */

.hero {
  background: linear-gradient(170deg, var(--brand-900) 0%, var(--brand-700) 62%, var(--brand-500) 100%);
  color: #fff; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.6rem, 5vw, 4rem);
}
.hero h1 { color: #fff; max-width: 20ch; }
.hero__kicker {
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin: 0 0 1rem; font-weight: 600;
}
.hero__lede { font-size: clamp(1.02rem, 1.7vw, 1.2rem); color: rgba(255,255,255,.8); max-width: 62ch; margin: 0; }
.hero--home { padding-block: clamp(4rem, 9vw, 7rem) clamp(3rem, 6vw, 5rem); }
.hero--home h1 { max-width: 16ch; }
.hero__actions { margin: 2rem 0 0; display: flex; gap: .75rem; flex-wrap: wrap; }

.btn {
  display: inline-block; background: var(--brand); color: var(--brand-900);
  padding: .7rem 1.4rem; border-radius: var(--radius); text-decoration: none;
  font-size: .9rem; font-weight: 600; letter-spacing: .02em; border: 1px solid var(--brand);
}
.btn:hover { background: var(--brand-300); border-color: var(--brand-300); color: var(--brand-900); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn--ghost:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }

.linkish {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: .88rem; color: var(--brand-500);
  text-decoration: underline; text-underline-offset: 3px;
}
.linkish:hover { color: var(--brand-600); }

/* ---------------------------------------------------------------- 版块 */

.main { padding-block: 3rem 4rem; }
main.wrap > .section:first-child { margin-top: -1rem; }

.section { padding-block: clamp(3rem, 6vw, 4.75rem); }
.section--tint { background: var(--brand-50); border-block: 1px solid var(--line); }
.section__title { margin-top: .2em; }
.section__lede { color: var(--ink-mid); max-width: 66ch; margin-bottom: 2rem; }

.eyebrow {
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-500); font-weight: 700; margin: 0;
}

/* 首页版块在 main.wrap 之外全宽，这里做补偿 */
main.wrap { max-width: none; padding-inline: 0; }
main.wrap > .prose,
main.wrap > .grid,
main.wrap > .stack,
main.wrap > .detail,
main.wrap > .filters,
main.wrap > .crumbs,
main.wrap > .disclaimer,
main.wrap > .empty {
  width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px;
}

.wrap--split { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }

.cta-row { margin-top: 2rem; }

/* ---------------------------------------------------------------- 网格与卡片 */

.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--builders { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

.pillar h3 { margin-top: 0; }
.pillar p { color: var(--ink-mid); font-size: .95rem; }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.35rem 1.4rem 1.5rem;
  display: flex; flex-direction: column;
}
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.card h3 { margin: 0 0 .15rem; font-size: 1.1rem; }
.card h3 a { text-decoration: none; color: var(--brand-900); }
.card h3 a:hover { color: var(--brand-600); }
.card__meta { color: var(--ink-soft); font-size: .84rem; margin: 0 0 .9rem; }
.card__note { font-size: .82rem; color: var(--ink-soft); margin: .9rem 0 0; padding-top: .8rem; border-top: 1px solid var(--line); }

.card__specs, .specs { margin: 0; font-size: .87rem; }
.card__specs dt, .specs dt {
  color: var(--ink-soft); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; margin-top: .7rem;
}
.card__specs dd, .specs dd { margin: .1rem 0 0; color: var(--ink); }
.card__specs dt:first-child, .specs dt:first-child { margin-top: 0; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 1rem 0 0; padding: 0; }
.chips li {
  font-size: .72rem; letter-spacing: .04em; font-weight: 600;
  background: var(--brand-50); color: var(--brand-500);
  border: 1px solid var(--brand-100); border-radius: 2px; padding: .2rem .5rem;
}

.badge {
  flex: none; font-size: .68rem; line-height: 1.4; font-weight: 600;
  letter-spacing: .03em; padding: .18rem .5rem; border-radius: 2px;
  border: 1px solid; white-space: nowrap; margin-top: .15rem;
}
/* 三档来源，颜色按可信度递减。
   「协会走访」是目前最可靠的一档，用品牌色，不能用琥珀色——那会读成警告。 */
.badge--verified   { color: var(--ok); border-color: #B9D8C8; background: #EEF7F2; }
.badge--pending    { color: var(--brand-500); border-color: var(--brand-100); background: var(--brand-50); }
.badge--unverified { color: var(--ink-soft); border-color: var(--line); background: #F6F7F8; }

/* ---------------------------------------------------------------- 筛选器 */

.filters { margin-bottom: 2rem; }
.filters__row { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: .9rem; }

/* 筛选器折叠按钮：只在窄屏出现 */
.filters__toggle { display: none; }
.filters__active {
  display: none; margin-left: .5rem; background: var(--brand); color: var(--brand-900);
  border-radius: 999px; padding: 0 .45rem; font-size: .72rem; font-weight: 700;
}
.filters__active.is-on { display: inline-block; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field span {
  font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 600;
}
.field input, .field select {
  font: inherit; font-size: .9rem; padding: .5rem .6rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--brand-500); outline-offset: -1px; }
.filters__count { font-size: .85rem; color: var(--ink-soft); margin: 1rem 0 0; }
.filters__count #f-count { font-weight: 700; color: var(--ink); }

.empty { text-align: center; color: var(--ink-soft); padding: 3rem 0; }

/* 来源图例：让读者看懂卡片上「协会走访 / 公开资料」标签的含义 */
.legend-wrap {
  margin: 0 0 1.5rem; padding: .8rem 1rem;
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: var(--radius); font-size: .84rem; color: var(--ink-mid);
}
.legend-wrap p { margin: 0; }
.legend-wrap strong { color: var(--brand-500); }

/* ---------------------------------------------------------------- 详情页 */

.crumbs { font-size: .85rem; color: var(--ink-soft); margin-bottom: 1.5rem; }
.crumbs a { color: var(--ink-mid); }

.detail { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.detail__head { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.detail__head h1 { margin: 0 0 1rem; font-size: clamp(1.7rem, 3.4vw, 2.35rem); }
.detail__side {
  background: var(--brand-50); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
}
.detail__side h2 {
  margin: 0 0 1.1rem; font-size: .8rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft); font-family: var(--sans); font-weight: 700;
}
.detail__side dd { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- 正文排版 */

.prose { max-width: 74ch; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.prose li { margin-bottom: .4em; }
.prose code {
  font-size: .88em; background: var(--brand-50);
  padding: .1em .35em; border-radius: 2px; border: 1px solid var(--brand-100);
}
blockquote {
  margin: 1.6rem 0; padding-left: 1.2rem;
  border-left: 3px solid var(--brand); color: var(--ink-mid); font-style: italic;
}

.table-wrap { overflow-x: auto; margin: 1.5rem 0 1.8rem; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
thead th {
  background: var(--brand-50); text-align: left; font-weight: 600;
  color: var(--brand-700); padding: .7rem .85rem; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: .7rem .85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }

.callout {
  margin: 1.7rem 0; padding: 1.1rem 1.25rem;
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-left: 3px solid var(--brand); border-radius: var(--radius);
  font-size: .91rem; color: var(--ink-mid);
}
.callout p { margin: 0 0 .5em; }
.callout p:last-child { margin-bottom: 0; }
.callout__title { font-weight: 700; color: var(--ink); font-size: .85rem; letter-spacing: .01em; }

.disclaimer {
  margin-top: 3rem; padding: 1.1rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--brand-50); font-size: .82rem; color: var(--ink-soft); line-height: 1.6;
}
.disclaimer p { margin: 0; }

/* ---------------------------------------------------------------- 新闻 */

.newslist { list-style: none; margin: 0; padding: 0; }
.newslist li { padding: .85rem 0; border-bottom: 1px solid var(--line); }
.newslist time { display: block; font-size: .75rem; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: .15rem; }
.newslist a { text-decoration: none; font-size: .95rem; }
.newslist a:hover { text-decoration: underline; }

.stack { max-width: 74ch; }
.newsitem { padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.newsitem:last-child { border-bottom: 0; }
.newsitem time { font-size: .78rem; letter-spacing: .08em; color: var(--brand-500); font-weight: 600; }
.newsitem h2 { margin: .3rem 0 .5rem; font-size: 1.3rem; }
.newsitem p { color: var(--ink-mid); margin: 0; }

/* ---------------------------------------------------------------- 页脚 */

.footer { background: var(--brand-900); color: rgba(255,255,255,.72); margin-top: 4rem; padding-top: 3rem; font-size: .88rem; }
.footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.footer a:hover { color: var(--brand); text-decoration: underline; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer__name { font-family: var(--serif); color: #fff; font-size: 1.02rem; margin: 0 0 .35rem; }
.footer__addr { margin: 0 0 .35rem; }
.footer__nav ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.footer__nav li { margin-bottom: .55rem; break-inside: avoid; }
.footer__base {
  border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.4rem 2rem;
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  font-size: .8rem; color: rgba(255,255,255,.55);
}
.footer__base p { margin: 0; max-width: 68ch; }
.footer__legal { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; text-align: right; }
.footer__icp { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) {
  .footer__legal { align-items: flex-start; text-align: left; }
  .footer__icp { justify-content: flex-start; }
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 900px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .wrap--split, .detail { grid-template-columns: 1fr; }
  .filters__row { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .navtoggle { display: block; }
  .sitenav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--brand-700); padding: .5rem 24px 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  .nav-open .sitenav { display: block; }
  .sitenav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .sitenav a { padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  .sitenav a.is-active { border-bottom-color: var(--brand); }
  .sitenav__lang { margin-top: .8rem; }
  .sitenav__lang a { display: inline-block; border-bottom: 1px solid rgba(255,255,255,.28); }
  .brand__text { font-size: .85rem; max-width: 16ch; }
  .topbar { position: static; }

  /* 窄屏：把点击区域撑到手指能可靠命中的高度（正文行内链接除外） */
  .footer__nav a,
  .newslist a,
  .card h3 a { display: block; padding-block: .45rem; }
  .footer__nav li { margin-bottom: .15rem; }
  .newslist li { padding-block: .55rem; }
  .linkish { display: inline-block; padding-block: .5rem; }
  .crumbs a { display: inline-block; padding-block: .3rem; }

  /* 窄屏：筛选器默认收起，避免 5 个控件把结果顶到屏幕外 */
  .filters__toggle {
    display: flex; align-items: center; width: 100%;
    font: inherit; font-size: .9rem; font-weight: 600; text-align: left;
    background: var(--brand-50); color: var(--brand-700);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: .7rem .9rem; cursor: pointer;
  }
  .filters__toggle::after {
    content: "▾"; margin-left: auto; font-size: .9rem; color: var(--ink-soft);
  }
  .filters.is-open .filters__toggle::after { content: "▴"; }
  .filters__row { display: none; grid-template-columns: 1fr; margin-top: .9rem; }
  .filters.is-open .filters__row { display: grid; }
}

@media print {
  .topbar, .footer__nav, .filters, .hero__actions { display: none; }
  body { font-size: 11pt; }
  .hero { background: none; color: #000; padding: 0; }
  .hero h1, .hero__lede { color: #000; }
}

/* ---------------------------------------------------------------- 字体

   要求：只用免费／开源字体，或访问者操作系统自带的字体。不使用任何商业授权字体。

   协会 VI 指定的方正兰亭大黑_GBK 与 DINCond-Black 都是商业授权字体，
   既不能作为网页字体分发，也不宜写进字体栈。它们只存在于已经栅格化的 logo 图片中。

   拉丁文标题  Source Serif 4（SIL Open Font License 1.1，可自由使用与再分发）
              自托管在 /static/fonts/，不引用 Google Fonts —— fonts.googleapis.com
              在中国大陆无法访问，中文站若引用会导致字体请求超时、首屏被阻塞。
              许可证全文随字体一起放在 /static/fonts/OFL.txt，OFL 要求如此。
              可变字体，一个文件同时提供 400 与 600 两个字重。

   中文        使用系统自带字体，不下载任何字体文件。完整中文字库体积在 5—10 MB 量级，
              做网页字体不现实；子集化又会在新增内容出现生僻字时露出字体混用。
              栈内优先 Noto Sans/Serif CJK 与思源系列（均为 OFL），
              其次是各系统自带的苹方、微软雅黑、宋体。

   正文拉丁    使用 system-ui，即各系统的界面字体。不下载、无授权问题。
              原字体栈里的 Iowan Old Style、Palatino、Segoe UI、Helvetica Neue
              都是专有字体，已从栈中移除。
*/

@font-face {
  font-family: "Source Serif 4";
  src: url("/static/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  /* 只在需要拉丁字符时才下载 */
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
