/* ===== reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #F8F4E8;
  color: #3E2F23;
  line-height: 1.75;
  font-weight: 400;
  min-height: 100vh;
}

ul,
ol,
menu {
  list-style: none;
}

img,
figure,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

address {
  font-style: normal;
}

:focus-visible {
  outline: 3px solid #F26D21;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== variables ===== */
:root {
  --c-blue: #1B6BB0;
  --c-cream: #F8F4E8;
  --c-white: #FFFFFF;
  --c-orange: #F26D21;
  --c-gold: #C8A24B;
  --c-ink: #3E2F23;
  --c-red: #C1272D;
  --c-lake: #DCEAF5;

  --font-head: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-num: "DIN Alternate", "Barlow", "Roboto Mono", monospace;

  --container-max: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 120px;
  --radius: 0px;
  --transition: 0.25s ease;
  --section-space: clamp(56px, 8vw, 96px);
}

/* ===== container ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ===== skip-link ===== */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 5000;
  background: var(--c-ink);
  color: var(--c-cream);
  padding: 8px 14px;
  font-size: 14px;
  transform: translateY(-160%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  border-radius: 2px;
}

.skip-link:focus-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ===== progress-bar ===== */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--c-orange), var(--c-blue));
  z-index: 4000;
  transition: width 0.1s linear;
}

/* ===== header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 2000;
  background: var(--c-cream);
  border-bottom: 2px solid var(--c-ink);
  box-shadow: 0 2px 0 rgba(62, 47, 35, 0.05);
}

.header-shell {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: 14px 0;
}

.header-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink);
  border-bottom: 1px solid var(--c-gold);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.header-topline__meta {
  font-weight: 400;
}

.header-topline__login {
  font-weight: 700;
  color: var(--c-blue);
  text-decoration: none;
  padding: 2px 10px;
  border: 1px solid var(--c-blue);
  transition: background 0.2s, color 0.2s;
}

.header-topline__login:hover,
.header-topline__login:focus-visible {
  background: var(--c-blue);
  color: var(--c-white);
}

.header-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
}

.brand__name {
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--c-ink);
  line-height: 1.1;
}

.brand__tag {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--c-blue);
  border-left: 2px solid var(--c-gold);
  padding-left: 8px;
  line-height: 1.2;
  margin-top: 4px;
}

/* nav-toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px 6px;
}

.nav-toggle__bar {
  width: 24px;
  height: 3px;
  background: var(--c-ink);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle__text {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--c-ink);
  text-transform: uppercase;
}

/* nav desktop */
.site-nav {
  border-top: 1px solid var(--c-ink);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

.nav-list a {
  display: block;
  padding: 12px 18px 14px;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--c-ink);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--c-blue);
  border-bottom-color: var(--c-blue);
  background: rgba(27, 107, 176, 0.04);
}

.nav-list a[aria-current="page"] {
  color: var(--c-blue);
  border-bottom-color: var(--c-red);
  font-weight: 900;
}

/* ===== main ===== */
.main-content {
  overflow: clip;
}

/* ===== footer ===== */
.site-footer {
  background: var(--c-ink);
  color: rgba(248, 244, 232, 0.9);
  margin-top: var(--section-space);
}

.footer-shell {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: 48px 28px;
}

.footer-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 2px solid var(--c-gold);
  padding-bottom: 18px;
  margin-bottom: 24px;
}

.footer-brand {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.footer-slogan {
  font-size: 13px;
  color: var(--c-gold);
  letter-spacing: 0.1em;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.footer-heading {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 12px;
  border-left: 3px solid var(--c-orange);
  padding-left: 10px;
}

.footer-address {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(248, 244, 232, 0.85);
  margin-bottom: 8px;
}

.footer-contact-line {
  font-size: 14px;
  line-height: 1.8;
}

.footer-contact-line a {
  color: rgba(248, 244, 232, 0.9);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-contact-line a:hover {
  color: var(--c-orange);
}

.footer-quick {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-quick a {
  display: inline-block;
  font-size: 14px;
  color: rgba(248, 244, 232, 0.85);
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.footer-quick a:hover,
.footer-quick a:focus-visible {
  color: var(--c-white);
  border-bottom-color: var(--c-gold);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid rgba(248, 244, 232, 0.2);
  font-size: 13px;
  color: rgba(248, 244, 232, 0.55);
}

.footer-icp a {
  color: rgba(248, 244, 232, 0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-icp a:hover {
  color: var(--c-orange);
}

/* ===== buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  padding: 12px 22px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
}

.btn--primary {
  background: var(--c-orange);
  color: var(--c-white);
  box-shadow: 0 2px 0 rgba(62, 47, 35, 0.2);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #d85518;
  transform: translateY(-1px);
  box-shadow: 0 4px 0 rgba(62, 47, 35, 0.15);
}

.btn--outline {
  border-color: var(--c-blue);
  color: var(--c-blue);
  background: transparent;
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--c-blue);
  color: var(--c-white);
}

.btn--text {
  padding: 8px 4px;
  color: var(--c-blue);
  border-bottom: 1px solid var(--c-blue);
  border-radius: 0;
}

.btn--text:hover {
  color: var(--c-ink);
  border-bottom-color: var(--c-ink);
}

/* ===== section ===== */
.page-section {
  padding-block: var(--section-space);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--c-gold);
  padding-bottom: 10px;
}

.section-index {
  font-family: var(--font-num);
  font-size: 23px;
  font-weight: 800;
  color: var(--c-orange);
  line-height: 1;
  letter-spacing: 0.02em;
  min-width: 44px;
}

.section-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  font-family: var(--font-head);
  letter-spacing: 0.02em;
  color: var(--c-ink);
  line-height: 1.2;
}

.page-section[data-active] .section-index {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ===== card ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card-grid--ledger {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.card {
  background: var(--c-white);
  border: 1px solid rgba(62, 47, 35, 0.15);
  border-left: 4px solid var(--c-gold);
  padding: 22px 20px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  box-shadow: 0 1px 0 rgba(62, 47, 35, 0.05);
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(62, 47, 35, 0.08);
  border-left-color: var(--c-blue);
}

.card__header {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  color: var(--c-ink);
  margin-bottom: 8px;
}

.card__body {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(62, 47, 35, 0.8);
}

.card.is-hidden {
  display: none;
}

/* ===== tags ===== */
.tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--c-cream);
  border: 1px solid rgba(62, 47, 35, 0.3);
  margin: 0 4px 4px 0;
}

.tag--gold {
  background: rgba(200, 162, 75, 0.15);
  border-color: var(--c-gold);
  color: #8a6a2a;
}

.tag--blue {
  background: rgba(27, 107, 176, 0.08);
  border-color: var(--c-blue);
  color: var(--c-blue);
}

.tag--red {
  background: rgba(193, 39, 45, 0.06);
  border-color: var(--c-red);
  color: var(--c-red);
}

/* ===== data-row (score/list) ===== */
.data-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-top: 1px solid rgba(62, 47, 35, 0.15);
  border-bottom: 1px solid rgba(62, 47, 35, 0.15);
  font-size: 15px;
}

.data-row__item {
  flex: 1 1 180px;
  padding: 12px 10px;
}

.data-row__item + .data-row__item {
  border-left: 1px solid rgba(62, 47, 35, 0.1);
}

.data-row__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-blue);
  display: block;
  margin-bottom: 2px;
}

.numeric {
  font-family: var(--font-num);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--c-ink);
}

/* ===== image frame ===== */
.img-frame {
  position: relative;
  overflow: hidden;
  background: var(--c-lake);
  border: 1px solid rgba(62, 47, 35, 0.15);
}

.img-frame::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 26px;
  height: 26px;
  border-right: 3px solid var(--c-gold);
  border-bottom: 3px solid var(--c-gold);
  pointer-events: none;
}

.img-frame--16x9 {
  aspect-ratio: 16 / 9;
}

.img-frame--cover {
  aspect-ratio: 21 / 7;
}

.img-frame--square {
  aspect-ratio: 1 / 1;
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== content body ===== */
.content-body {
  max-width: 780px;
  font-size: 16px;
  line-height: 1.85;
}

.content-body h2 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 900;
  color: var(--c-ink);
  margin-block: 1.8em 0.5em;
  padding-left: 0.6em;
  border-left: 5px solid var(--c-gold);
}

.content-body p {
  margin-bottom: 1.2em;
}

.content-body a {
  color: var(--c-blue);
  text-decoration: underline;
}

/* ===== callout ===== */
.callout {
  background: var(--c-lake);
  border-left: 4px solid var(--c-blue);
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.7;
}

.callout--gold {
  background: rgba(200, 162, 75, 0.12);
  border-left-color: var(--c-gold);
}

/* ===== index-list (journal) ===== */
.index-list {
  border-top: 1px solid var(--c-gold);
}

.index-list__item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
  padding: 18px 6px;
  border-bottom: 1px solid rgba(62, 47, 35, 0.15);
  text-decoration: none;
  transition: background 0.2s, padding-left 0.2s;
}

.index-list__item:hover,
.index-list__item:focus-visible {
  background: rgba(27, 107, 176, 0.04);
  padding-left: 14px;
}

.index-list__date {
  font-family: var(--font-num);
  font-size: 14px;
  color: var(--c-blue);
  white-space: nowrap;
}

.index-list__title {
  font-weight: 700;
  color: var(--c-ink);
}

/* ===== divider ===== */
.divider {
  display: flex;
  align-items: center;
  color: var(--c-gold);
  margin-block: 36px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-top: 2px solid var(--c-gold);
}

.divider__icon {
  padding-inline: 10px;
  font-size: 18px;
  line-height: 1;
}

/* ===== accordion (faq) ===== */
.accordion {
  border-top: 1px solid var(--c-ink);
}

.accordion__item {
  border-bottom: 1px solid rgba(62, 47, 35, 0.15);
}

.accordion__trigger {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 16px 4px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  text-align: left;
  cursor: pointer;
}

.accordion__icon {
  transition: transform 0.25s;
  font-family: var(--font-num);
  font-weight: 400;
  font-size: 22px;
}

.accordion__item[data-open] .accordion__icon {
  transform: rotate(45deg);
}

.accordion__panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion__panel-inner {
  padding: 0 6px 18px;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.7;
}

/* ===== filter ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  border: 1px solid rgba(62, 47, 35, 0.3);
  background: var(--c-white);
  color: var(--c-ink);
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn[data-active] {
  border-color: var(--c-red);
  background: var(--c-red);
  color: var(--c-white);
}

/* ===== mobile-cta ===== */
.mobile-cta {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 3000;
  display: none;
  align-items: center;
  gap: 10px;
  background: var(--c-orange);
  color: var(--c-white);
  font-weight: 800;
  font-size: 15px;
  padding: 14px 18px;
  border-radius: 60px;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(62, 47, 35, 0.25);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-cta::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--c-white);
  border-radius: 2px;
  transform: rotate(45deg);
}

.mobile-cta[data-hidden="true"] {
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
}

/* ===== tab ===== */
.tab-list {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--c-gold);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 20px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  color: rgba(62, 47, 35, 0.6);
  border: 1px solid transparent;
  border-bottom: none;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.tab-btn[data-active] {
  color: var(--c-ink);
  background: var(--c-white);
  border-color: var(--c-gold);
  border-bottom: 2px solid var(--c-white);
  margin-bottom: -2px;
}

.tab-panel {
  display: none;
}

.tab-panel[data-active] {
  display: block;
}

/* ===== responsive ===== */
@media (max-width: 760px) {
  .header-shell {
    padding-block: 10px 0;
  }

  .header-brand-row {
    border-bottom: none;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    border-top: none;
  }

  .site-nav[data-open] {
    display: block;
  }

  .site-nav[data-open] .nav-list {
    flex-direction: column;
    padding-bottom: 12px;
  }

  .nav-list a {
    padding: 12px 12px;
    border-left: 3px solid transparent;
    border-bottom: none;
  }

  .nav-list a[aria-current="page"] {
    border-left-color: var(--c-red);
    border-bottom: none;
    background: rgba(27, 107, 176, 0.06);
  }

  .header-topline {
    font-size: 11px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .mobile-cta {
    display: inline-flex;
  }

  .data-row__item + .data-row__item {
    border-left: none;
    border-top: 1px solid rgba(62, 47, 35, 0.08);
  }

  .section-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .header-topline {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .brand__tag {
    font-size: 12px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-brand-row {
    flex-direction: column;
  }
}

/* ===== print / reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .progress-bar {
    display: none;
  }

  .card:hover,
  .card:focus-within {
    transform: none;
    box-shadow: none;
  }

  .mobile-cta {
    transition: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .mobile-cta,
  .progress-bar,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: white;
  }
}
