:root {
  color-scheme: light;
  --paper: #f6f5ee;
  --ink: #191b13;
  --quiet: #56594c;
  --rule: #d5d6c9;
  --lime: #dcf77b;
  --lime-hover: #cde865;
  --display: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.65 var(--display); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid #526316; outline-offset: 4px; }
h1, h2, p { margin: 0; }
section { scroll-margin-top: 26px; }

.shell { width: min(1240px, calc(100% - 112px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; top: 12px; left: 12px; padding: 8px 12px; background: var(--lime); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.masthead { min-height: 82px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.brand-mark { position: relative; display: inline-block; width: 31px; height: 31px; background: var(--ink); border-radius: 50%; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 7px 5px; border: 1px solid var(--lime); border-radius: 50%; transform: rotate(-40deg); }
.brand-mark::after { inset: 6px 10px; transform: rotate(43deg); }
nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 41px); }
nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; text-decoration: none; white-space: nowrap; }
nav a:hover, .footer a:hover { text-decoration: underline; text-underline-offset: 5px; }

.hero { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 65px); align-items: center; padding: 41px 0 49px; }
.hero-copy { padding-block: 16px; }
.kicker { display: flex; align-items: center; gap: 10px; font: 600 12px/1.45 var(--mono); letter-spacing: .095em; color: var(--quiet); }
.kicker span { width: 14px; height: 1px; background: #8b9275; }
h1 { font-size: clamp(52px, 5.5vw, 81px); line-height: 1.13; letter-spacing: -.082em; margin-block: 21px 19px; font-weight: 800; }
.period { color: #58691d; margin-left: .11em; }
.intro { max-width: 24em; color: var(--quiet); font-size: clamp(16px, 1.5vw, 19px); line-height: 1.85; }
.hero-actions, .tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hero-actions { gap: 22px; margin-top: 28px; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 14px; min-height: 44px; border: 1px solid var(--ink); border-radius: 5px; padding: 8px 15px; font-size: 14px; font-weight: 650; text-decoration: none; }
.primary { background: var(--lime); }
.primary:hover { background: var(--lime-hover); }
.secondary { background: transparent; border-color: var(--rule); }
.secondary:hover:not(:disabled) { background: #ecede4; }
.secondary:disabled { opacity: .55; }
.text-link { text-decoration: underline; text-underline-offset: 5px; font-size: 14px; }
.text-link:hover { color: #526316; }
.hero-art { position: relative; overflow: hidden; aspect-ratio: 1.46; background: #171915; border-radius: 10px; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.art-frame { position: absolute; inset: 13px; border: 1px solid #e5f2bb35; border-radius: 3px; pointer-events: none; }

.section { padding: 33px 0 40px; border-top: 1px solid var(--rule); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px 24px; margin-bottom: 22px; }
h2 { font-size: clamp(25px, 3.05vw, 37px); line-height: 1.2; font-weight: 750; letter-spacing: -.055em; }
.section-head p { font-size: 14px; color: var(--quiet); }
.noscript { margin-bottom: 14px; color: var(--quiet); }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-card { width: 100%; min-height: 152px; display: grid; grid-template-columns: auto 1fr auto; column-gap: 14px; row-gap: 7px; align-content: center; text-align: start; border: 1px solid var(--rule); border-radius: 8px; padding: 25px; background: #fdfdf7; transition: border-color .15s, background .15s; }
.tool-card:hover:not(:disabled) { border-color: #88954f; background: #f4f8e5; }
.tool-icon { display: grid; place-items: center; align-self: center; width: 48px; height: 48px; grid-row: span 2; border-radius: 7px; background: #eaf4c6; font: 600 20px/1 var(--mono); }
.time-icon span { position: relative; width: 21px; height: 21px; border: 1.5px solid var(--ink); border-radius: 50%; }
.time-icon span::after { content: ""; position: absolute; left: 8px; top: 3px; width: 5px; height: 6px; border: solid var(--ink); border-width: 0 0 1.5px 1.5px; }
.tool-name { font-size: 19px; font-weight: 750; line-height: 1.35; }
.tool-description { grid-column: 2 / -1; color: var(--quiet); font-size: 14px; line-height: 1.5; }
.tool-arrow { grid-column: 3; grid-row: 1; font: 20px/1.35 var(--mono); }

.notes { border-top: 1px solid var(--rule); }
details { border-bottom: 1px solid var(--rule); }
summary { display: flex; min-height: 62px; gap: 12px; align-items: center; justify-content: space-between; list-style: none; font-weight: 650; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 22px/1 var(--mono); }
details[open] summary::after { content: "−"; }
summary:hover { color: #526316; }
.note-body { max-width: 48rem; padding: 0 20px 20px 0; color: var(--quiet); }
.note-body p + p { margin-top: 8px; }
.note-body code { font-family: var(--mono); background: #ebece1; padding-inline: 4px; overflow-wrap: anywhere; }
.about { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 2fr); align-items: baseline; gap: 12px 36px; }
.about p { color: var(--quiet); }
.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-block: 22px; border-top: 1px solid var(--rule); color: var(--quiet); font-size: 13px; }
.footer a { display: inline-flex; align-items: center; min-height: 30px; text-decoration: none; }
.back-top { margin-left: auto; }

dialog { width: min(650px, calc(100% - 28px)); max-height: calc(100% - 28px); color: var(--ink); background: var(--paper); border: 1px solid #878d73; border-radius: 12px; padding: clamp(16px, 4vw, 30px); }
dialog::backdrop { background: #14170ecc; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dialog-head h2 { font-size: 27px; }
.close { width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: 5px; background: #fdfdf7; font-size: 24px; line-height: 1; }
dialog label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 650; }
dialog textarea, dialog input, dialog select { display: block; width: 100%; color: var(--ink); background: #fdfdf7; border: 1px solid #a8ac98; border-radius: 5px; padding: 9px 10px; }
dialog textarea, dialog input { font-family: var(--mono); }
dialog textarea { resize: vertical; }
dialog select { margin-bottom: 12px; }
.tool-actions, .copy { margin-top: 10px; }
.status { min-height: 1.5em; margin: 8px 0; font-size: 14px; color: var(--quiet); overflow-wrap: anywhere; }
.status[data-error] { color: #a12f21; }

@media (max-width: 1040px) {
  .shell { width: calc(100% - 72px); }
  .hero { gap: 28px; }
  .tool-card { padding: 20px; }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 40px); }
  .masthead { min-height: 66px; gap: 14px; }
  .brand { gap: 7px; font-size: 14px; }
  .brand-mark { width: 26px; height: 26px; }
  .brand-mark::before { inset: 6px 4px; }
  .brand-mark::after { inset: 5px 8px; }
  nav { gap: 12px; }
  nav a { font-size: 13px; }
  .hero { grid-template-columns: 1fr; padding: 26px 0 32px; gap: 21px; }
  .hero-art { aspect-ratio: 1.6; }
  .hero-copy { padding-top: 10px; }
  .section { padding: 26px 0 31px; }
  .section-head { flex-wrap: wrap; margin-bottom: 16px; }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .shell { width: calc(100% - 32px); }
  h1 { font-size: clamp(44px, 12vw, 62px); margin-block: 16px 15px; }
  .hero-actions { margin-top: 21px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 108px; }
  .back-top { margin-left: 0; }
}
@media (max-width: 350px) {
  .masthead { gap: 8px; }
  nav { gap: 8px; }
  .brand { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tool-card { transition: none; }
}
