:root {
  --paper: #f5f0e5;
  --paper-soft: #fffaf0;
  --ink: #151a1f;
  --muted: #59656b;
  --line: #beb39e;
  --sage: #91b29a;
  --sage-soft: #dbe8dc;
  --red: #9d2f3a;
  --blue: #0068ff;
  --yellow: #f0ce6a;
  --white: #ffffff;
  --shadow: #d7cdbb;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(21, 26, 31, .035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(21, 26, 31, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  color: var(--ink);
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.68;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(21, 26, 31, .09) .7px, transparent .7px);
  background-size: 9px 9px;
  opacity: .22;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

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

a:hover {
  color: var(--blue);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 4px solid rgba(0, 104, 255, .32);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 18px;
  top: -80px;
  background: var(--ink);
  color: var(--white);
  padding: 12px 16px;
  z-index: 50;
}

.skip-link:focus {
  top: 18px;
}

.wrap {
  width: min(1360px, calc(100% - 64px));
  margin: 0 auto;
}

.site-top {
  min-height: 86px;
  display: grid;
  grid-template-columns: 270px 1fr 210px;
  align-items: center;
  gap: 24px;
  border-bottom: 2px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 950;
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 42px;
  height: 42px;
  min-width: 42px;
  max-width: 42px;
  max-height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--sage-soft);
  font-weight: 950;
  overflow: hidden;
}

.brand img,
.brand-logo,
img.logo,
img[src$="/assets/logo.png"],
img[src*="/assets/logo.png?"] {
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  object-fit: contain;
  flex: 0 0 42px;
  display: block;
}

.brand-text {
  min-width: 0;
}

.brand-text span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-family: "Cascadia Mono", Consolas, monospace;
  letter-spacing: .08em;
  line-height: 1.1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 850;
}

.nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.top-cta,
.button,
.button-small {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}

.top-cta:hover,
.button:hover,
.button-small:hover {
  color: var(--ink);
  background: var(--yellow);
  transform: translate(-2px, -2px);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.button.secondary:hover {
  background: var(--sage-soft);
  color: var(--ink);
}

.button-small {
  min-height: 42px;
  padding: 0 14px;
  font-size: 14px;
}

.hero {
  padding: 38px 0 72px;
}

.hero-sheet {
  min-height: 690px;
  background: var(--paper-soft);
  border: 2px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  box-shadow: 18px 18px 0 var(--sage-soft);
}

.hero-main {
  padding: 38px 44px 44px;
  position: relative;
}

.hero-main::after,
.stamp {
  content: "非官方教學";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--red);
  color: var(--red);
  padding: 10px 16px;
  transform: rotate(-7deg);
  font-weight: 950;
  letter-spacing: .08em;
}

.hero-main::after {
  position: absolute;
  right: 42px;
  top: 44px;
}

.eyebrow,
.mono {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-weight: 900;
  letter-spacing: .08em;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  max-width: 880px;
  font-size: clamp(60px, 8vw, 122px);
  line-height: .96;
  font-weight: 950;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 21px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.margin-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 780px;
  margin-top: 42px;
}

.note {
  min-height: 136px;
  border: 1px solid var(--ink);
  padding: 18px;
  background: #fbf5e8;
  position: relative;
}

.note:nth-child(2) {
  background: var(--sage-soft);
  transform: translateY(18px);
}

.note::before,
.taped::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: -10px;
  height: 18px;
  background: rgba(255, 255, 255, .58);
  border: 1px solid rgba(21, 26, 31, .22);
  transform: rotate(-2deg);
}

.note b {
  display: block;
  font-size: 22px;
  line-height: 1.25;
}

.note span {
  display: block;
  color: var(--muted);
  margin-top: 8px;
  font-size: 14px;
}

.scribble {
  position: absolute;
  left: 46px;
  bottom: 38px;
  width: 238px;
  height: 82px;
  border: 3px solid var(--red);
  border-radius: 52% 47% 58% 42%;
  transform: rotate(-5deg);
  pointer-events: none;
}

.scribble::after {
  content: "先審閱";
  position: absolute;
  right: -68px;
  top: -26px;
  color: var(--red);
  font-weight: 950;
  transform: rotate(9deg);
}

.admit {
  border-left: 2px solid var(--ink);
  background: #f8edcc;
  display: grid;
  grid-template-rows: 130px 1fr auto;
  position: relative;
  overflow: hidden;
}

.admit::before,
.admit::after {
  content: "";
  position: absolute;
  left: -8px;
  width: 16px;
  height: 100%;
  background:
    radial-gradient(circle at 8px 12px, var(--paper-soft) 0 5px, transparent 5.5px) 0 0 / 16px 28px repeat-y;
}

.admit::after {
  left: auto;
  right: -8px;
}

.admit-top {
  display: grid;
  place-items: center;
  border-bottom: 2px dashed var(--ink);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
}

.admit-body {
  padding: 26px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.admit-body .code {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 32px;
  line-height: 1;
  letter-spacing: .08em;
  color: var(--blue);
  font-weight: 950;
}

.admit-body strong {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 950;
}

.admit-bottom {
  padding: 24px;
  border-top: 2px dashed var(--ink);
}

.actions {
  display: grid;
  gap: 12px;
}

.fine {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.section {
  padding: 72px 0;
  border-top: 2px solid var(--ink);
}

.section.no-line {
  border-top: 0;
}

.head {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: start;
  margin-bottom: 34px;
}

.head h2,
.article h2 {
  margin: 0;
  font-size: clamp(36px, 4.2vw, 62px);
  line-height: 1.05;
}

.head p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  max-width: 780px;
}

.audit-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
}

.audit-main {
  background: var(--ink);
  color: var(--white);
  padding: 32px;
  min-height: 390px;
  display: grid;
  align-content: space-between;
  position: relative;
}

.audit-main h3 {
  margin: 14px 0 0;
  font-size: 42px;
  line-height: 1.12;
}

.audit-main p {
  max-width: 740px;
  color: #d6dde0;
}

.audit-side {
  display: grid;
  gap: 18px;
}

.audit-card,
.source-card,
.tool-card,
.article-card,
.mini-card {
  border: 1px solid var(--ink);
  background: var(--paper-soft);
  padding: 22px;
}

.audit-card:nth-child(2) {
  background: var(--sage-soft);
  transform: translateX(-20px);
}

.audit-card b,
.source-card b,
.tool-card b,
.mini-card b {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
  line-height: 1.25;
}

.tool-drawer {
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 2px solid var(--ink);
  background: var(--paper-soft);
}

.tabs {
  border-right: 2px solid var(--ink);
  background: var(--sage-soft);
}

.tab {
  min-height: 82px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 2px solid var(--ink);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-weight: 900;
}

.drawer-body {
  padding: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.tool-card {
  min-height: 186px;
  border-left: 8px solid var(--red);
  position: relative;
}

.tool-card::after {
  content: "";
  position: absolute;
  left: -14px;
  bottom: 14px;
  width: 28px;
  height: 2px;
  background: var(--red);
  transform: rotate(-18deg);
}

.tool-card p,
.article-card p,
.mini-card p,
.source-card p {
  color: var(--muted);
  margin: 0 0 14px;
}

.tool-card a,
.article-card a,
.source-card a {
  font-weight: 900;
}

.articles {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 24px;
}

.article-poster {
  background: var(--red);
  color: var(--white);
  min-height: 360px;
  padding: 32px;
  display: grid;
  align-content: space-between;
}

.article-poster h3 {
  margin: 0;
  font-size: 44px;
  line-height: 1.08;
}

.article-list {
  border: 1px solid var(--ink);
  background: var(--paper-soft);
}

.article-list a {
  min-height: 78px;
  display: grid;
  grid-template-columns: 96px 1fr 40px;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
  text-decoration: none;
}

.article-list a:last-child {
  border-bottom: 0;
}

.article-list span {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--red);
}

.callout-strip {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: stretch;
}

.callout-main {
  border: 2px solid var(--ink);
  background: var(--paper-soft);
  padding: 30px;
}

.callout-main h2,
.callout-main h3 {
  margin: 0 0 16px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.05;
}

.callout-side {
  background: var(--sage-soft);
  border: 2px solid var(--ink);
  padding: 26px;
}

.source-grid,
.tool-grid,
.note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tool-grid.two,
.note-grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.page-hero {
  padding: 46px 0 52px;
}

.page-sheet {
  border: 2px solid var(--ink);
  background: var(--paper-soft);
  box-shadow: 14px 14px 0 var(--shadow);
  padding: 34px;
}

.crumb {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.tool-shell {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.panel {
  border: 2px solid var(--ink);
  background: var(--paper-soft);
  padding: 24px;
}

.panel.sage {
  background: var(--sage-soft);
}

.panel.red {
  background: #f5d9d5;
}

.panel h2,
.panel h3 {
  margin-top: 0;
  font-size: 32px;
  line-height: 1.15;
}

.field,
.check-row,
.radio-row {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field label,
.check-row label,
.radio-row label {
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  min-height: 48px;
  border: 2px solid var(--ink);
  background: var(--white);
  padding: 10px 12px;
  border-radius: 0;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.check-row label,
.radio-row label {
  min-height: 44px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
}

.check-row input,
.radio-row input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  accent-color: var(--blue);
}

.result {
  border: 2px solid var(--ink);
  background: var(--white);
  min-height: 150px;
  padding: 22px;
}

.result strong {
  display: block;
  font-size: 28px;
  line-height: 1.15;
  margin-bottom: 10px;
}

.result.warn {
  background: #f5d9d5;
}

.result.ok {
  background: var(--sage-soft);
}

.result.wait {
  background: #fff0be;
}

.article-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 760px);
  gap: 48px;
  align-items: start;
}

.article-meta {
  border: 2px solid var(--ink);
  background: var(--sage-soft);
  padding: 20px;
  position: sticky;
  top: 20px;
}

.article-meta b {
  display: block;
  margin-bottom: 8px;
}

.article {
  border: 2px solid var(--ink);
  background: var(--paper-soft);
  padding: 34px;
}

.article h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1.02;
}

.article h2 {
  margin-top: 48px;
  font-size: clamp(30px, 3.6vw, 48px);
}

.article p,
.article li {
  color: #30383d;
}

.article li + li {
  margin-top: 8px;
}

.article .lead {
  font-size: 20px;
  color: var(--muted);
}

.article figure {
  margin: 28px 0;
  border: 1px solid var(--ink);
  background: var(--white);
  padding: 10px;
}

.toc-box {
  border: 2px solid var(--ink);
  background: var(--sage-soft);
  padding: 18px 20px;
  margin: 28px 0;
}

.toc-box b {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.toc-box a {
  display: inline-block;
  margin: 5px 12px 5px 0;
  font-weight: 850;
}

.source-note {
  margin-top: 48px;
  padding: 22px;
  border: 2px solid var(--ink);
  background: var(--sage-soft);
}

.source-note h2 {
  margin-top: 0;
}

.article figcaption {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.legal-layout {
  max-width: 920px;
  margin: 0 auto;
}

.footer {
  background: var(--ink);
  color: var(--white);
  padding: 38px 0;
}

.footer a {
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 28px;
}

.footer p {
  color: #d6dde0;
  margin: 8px 0 0;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.disclosure-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 18px;
}

.disclosure-card {
  width: min(860px, 100%);
  border: 3px solid var(--ink);
  background: var(--paper-soft);
  box-shadow: 16px 16px 0 var(--sage-soft);
  padding: 34px;
}

.disclosure-card h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
}

.countdown {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-weight: 950;
  font-size: 26px;
}

.status-list {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.status-list li {
  border-left: 7px solid var(--red);
  padding-left: 14px;
}

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

@media (max-width: 1080px) {
  .site-top {
    grid-template-columns: 1fr;
    padding: 16px 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .top-cta {
    width: 100%;
  }

  .hero-sheet,
  .head,
  .audit-grid,
  .tool-drawer,
  .drawer-body,
  .articles,
  .callout-strip,
  .source-grid,
  .tool-grid,
  .tool-grid.two,
  .note-grid,
  .note-grid.two,
  .tool-shell,
  .article-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .article-meta {
    position: static;
  }

  .tabs {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .wrap {
    width: min(100% - 28px, 720px);
  }

  .nav {
    display: none;
  }

  .brand {
    min-height: 44px;
  }

  .button-small {
    min-height: 44px;
  }

  .crumb a,
  .crumb,
  .page-sheet a,
  .panel a,
  .article a,
  .tool-card a,
  .article-card a,
  .source-card a,
  .mini-card a,
  .toc-box a,
  .article-meta a,
  .source-note a,
  .legal-layout a,
  .footer-links a,
  a[href^="mailto:"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .footer-links a {
    display: flex;
  }

  .hero {
    padding-top: 22px;
  }

  .hero-main,
  .page-sheet,
  .article,
  .panel,
  .disclosure-card {
    padding: 22px 18px;
  }

  .hero-main::after {
    position: static;
    display: inline-flex;
    margin-top: 20px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .lead {
    font-size: 18px;
  }

  .margin-notes {
    grid-template-columns: 1fr;
  }

  .note:nth-child(2),
  .audit-card:nth-child(2) {
    transform: none;
  }

  .admit {
    border-left: 0;
    border-top: 2px solid var(--ink);
  }

  .admit-body {
    writing-mode: initial;
    display: block;
    text-align: center;
  }

  .admit-body strong {
    display: block;
    font-size: 34px;
    margin-bottom: 12px;
  }

  .article-list a {
    grid-template-columns: 70px 1fr;
    padding: 14px;
  }

  .article-list em {
    display: none;
  }

  .scribble {
    display: none;
  }

  .section {
    padding: 48px 0;
  }
}
