:root {
  color-scheme: light;
  --paper: #f8f7f0;
  --ink: #233328;
  --muted: #5b675c;
  --forest: #294533;
  --line: #dedfd2;
  --card: #fffef8;
  --sage: #eaeee2;
  --serif: "Songti SC", STSong, "Noto Serif CJK SC", SimSun, serif;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #718952; outline-offset: 4px; }

.container { width: min(1184px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: absolute; inset: 12px auto auto 12px; z-index: 2; padding: 8px 14px; background: var(--card); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid #eae9de; }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; font-size: 20px; font-weight: 750; letter-spacing: .09em; }
.brand-mark { display: inline-block; width: 35px; height: 35px; position: relative; flex: 0 0 auto; border-radius: 50%; background: var(--forest); color: #f1eac9; }
.brand-mark::before, .brand-mark::after { position: absolute; content: ""; background: currentColor; }
.brand-mark::before { width: 12px; height: 6px; left: 16px; top: 11px; border-radius: 9px 1px 9px 1px; transform: rotate(-25deg); }
.brand-mark::after { width: 10px; height: 5px; left: 8px; top: 13px; border-radius: 1px 8px 1px 8px; transform: rotate(17deg); }
.brand-mark span { position: absolute; height: 12px; border-left: 1.5px solid; border-radius: 70%; left: 16px; top: 14px; transform: rotate(13deg); }
.nav { display: flex; align-items: center; gap: 33px; font-size: 14px; color: var(--muted); }
.nav a { padding-block: 8px; position: relative; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--forest); }
.nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; border-radius: 2px; background: #71885e; }

.hero {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 475px;
  isolation: isolate;
  overflow: hidden;
  margin-top: 27px;
  border-radius: 20px;
  background: #294332;
  color: #fbf9e9;
}
.hero-photo, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-photo { object-fit: cover; object-position: center 55%; }
.hero::after { content: ""; background: linear-gradient(90deg, rgba(13, 28, 19, .86), rgba(17, 32, 20, .67) 34%, rgba(21, 37, 24, .13) 73%, transparent 95%); }
.hero-copy { padding: 50px clamp(28px, 6.2vw, 85px); }
.hero h1 { font-family: var(--serif); font-size: clamp(48px, 6.15vw, 86px); font-weight: 700; letter-spacing: .035em; line-height: 1.15; }
.hero p { color: #f2efe3; font-size: clamp(15px, 1.55vw, 19px); letter-spacing: .045em; margin: 23px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 14px; padding: 10px 17px; border: 1px solid transparent; border-radius: 8px; font-weight: 650; font-size: 14px; line-height: 1.35; transition: background-color .18s, border-color .18s; }
.button-light { color: var(--forest); background: #f7f4e5; }
.button-light:hover { background: #fffdf4; }
.button-outline { border-color: #edeee1a1; background: #152c2070; color: #fffdf3; }
.button-outline:hover { background: #274532; }
.hero a:focus-visible { outline-color: #fff0bd; }

.section { scroll-margin-top: 26px; }
.journal { margin-block: 59px 62px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.section h2 { font-family: var(--serif); font-size: clamp(30px, 3.1vw, 42px); letter-spacing: .075em; line-height: 1.2; }
.section-heading p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.sample-note { display: flex; align-items: center; gap: 7px; }
.sample-note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #71885e; }
.journal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.entry { position: relative; min-width: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .18s, box-shadow .18s; }
.entry:hover, .entry:focus-within { border-color: #aeb8a4; box-shadow: 0 5px 20px #293c2d10; }
.entry > img { width: 100%; height: auto; aspect-ratio: 1.83; object-fit: cover; background: var(--sage); }
.entry-copy { padding: 17px 20px 22px; }
.entry-date { color: #5c6a5a; font-size: 12px; letter-spacing: .065em; font-variant-numeric: tabular-nums; }
.entry h3 { margin: 4px 0 6px; font-size: 19px; }
.entry-link { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 8px; padding: 0; border: 0; background: transparent; text-align: left; font-weight: inherit; }
.entry-link::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.entry-arrow, .tool-arrow { color: #57714f; }
.entry-copy > p:last-child { color: var(--muted); font-size: 14px; }

.tools { padding: 36px 34px 34px; border: 1px solid #dce2d3; border-radius: 18px; background: var(--sage); }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.tool-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 148px; padding: 17px; border: 1px solid #dde3d7; border-radius: 11px; background: var(--card); text-align: left; transition: border-color .18s, background-color .18s; }
.tool-card:hover { border-color: #9caf91; background: #fff; }
.tool-icon { display: grid; place-items: center; position: relative; width: 36px; height: 36px; margin-bottom: 6px; border-radius: 9px; background: #e8eddf; color: var(--forest); }
.tool-icon::before, .tool-icon::after { position: absolute; }
.clock-icon::before { content: ""; width: 18px; height: 18px; border: 1.5px solid; border-radius: 50%; }
.clock-icon::after { content: ""; width: 6px; height: 7px; left: 17px; top: 12px; border-left: 1.5px solid; border-bottom: 1.5px solid; border-radius: 0 0 0 2px; }
.count-icon { font: 700 17px Georgia, serif; }
.calendar-icon::before { content: ""; width: 18px; height: 16px; border: 1.5px solid; border-radius: 3px; background: linear-gradient(transparent 4px, currentColor 4px 5.5px, transparent 5.5px); }
.calendar-icon::after { content: ""; width: 8px; height: 5px; top: 8px; border-inline: 1.5px solid; }
.dice-icon::before { content: ""; width: 17px; height: 17px; border: 1.5px solid; border-radius: 4px; transform: rotate(-10deg); }
.dice-icon::after { content: ""; width: 3px; height: 3px; background: currentColor; border-radius: 50%; box-shadow: -4px -3px currentColor, 4px 3px currentColor; }
.tool-name { font-weight: 700; font-size: 16px; }
.tool-description { color: var(--muted); font-size: 13px; }
.tool-arrow { position: absolute; right: 15px; top: 17px; }

.about { display: flex; align-items: center; gap: clamp(26px, 5.8vw, 80px); padding: 45px 4px; margin-top: 14px; }
.about-heading { display: flex; flex: 0 0 auto; align-items: center; gap: 13px; }
.about h2 { font-size: clamp(24px, 2.7vw, 30px); }
.about p { max-width: 590px; color: var(--muted); font-size: 15px; }
.site-footer { border-top: 1px solid #e7e6db; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; min-height: 72px; color: var(--muted); font-size: 13px; }
.footer-filing { display: inline-flex; align-items: center; justify-self: center; min-height: 44px; text-align: center; white-space: nowrap; }
.footer-back { justify-self: end; }
.footer-inner a:hover { color: var(--forest); text-decoration: underline; }

.detail-dialog { width: min(570px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; border: 1px solid #dde2d6; border-radius: 16px; background: var(--card); color: var(--ink); box-shadow: 0 20px 80px #172c263e; }
.detail-dialog::backdrop { background: #14251cc4; }
body:has(.detail-dialog[open]) { overflow: hidden; }
.detail-inner { position: relative; padding: clamp(20px, 5vw, 36px); }
.detail-dialog h2 { margin: 0 45px 15px 0; font-family: var(--serif); font-size: 30px; line-height: 1.25; }
.close-button { position: absolute; right: 14px; top: 14px; display: grid; place-items: center; width: 36px; height: 36px; padding: 0 0 2px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); font-size: 24px; line-height: 1; }
.close-button:hover { background: var(--sage); }
.detail-photo { width: 100%; height: auto; max-height: 230px; object-fit: cover; margin: 12px 0 16px; border-radius: 10px; }
.detail-dialog p + p { margin-top: 10px; }
.detail-description { margin-bottom: 16px; color: var(--muted); font-size: 14px; }
.tool-form { display: grid; gap: 10px; }
.tool-form + .tool-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.tool-form label { font-size: 14px; font-weight: 650; }
.input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.two-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.two-fields label { display: grid; align-content: start; gap: 6px; }
.tool-form :is(input, textarea, select) { min-width: 0; width: 100%; min-height: 43px; padding: 8px 10px; border: 1px solid #cbd2c6; border-radius: 7px; background: #fff; color: var(--ink); font-size: 16px; }
.tool-form textarea { resize: vertical; }
.button-green { justify-self: start; background: var(--forest); color: #fffef8; }
.button-green:hover { background: #3a5a43; }
.tool-result { display: block; padding: 10px 13px; border-radius: 7px; background: var(--sage); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; font-variant-numeric: tabular-nums; }
.tool-result[data-error] { color: #7e3528; background: #faece4; }

@media (max-width: 900px) {
  .container { width: calc(100% - 48px); }
  .hero { min-height: 430px; }
  .journal-grid { gap: 13px; }
  .entry-copy { padding-inline: 14px; }
  .tools { padding: 27px; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-card { min-height: 132px; }
}

@media (max-width: 620px) {
  .container { width: calc(100% - 32px); }
  .header-inner { align-items: flex-start; flex-direction: column; gap: 9px; padding-block: 12px 6px; }
  .brand { font-size: 18px; }
  .nav { width: 100%; justify-content: space-between; gap: 12px; }
  .hero { min-height: 385px; margin-top: 15px; border-radius: 13px; }
  .hero-photo { object-position: 58% 54%; }
  .hero::after { background: linear-gradient(90deg, #102419e6, #122c20a8 60%, #152b2080); }
  .hero-copy { padding: 35px 23px; }
  .hero h1 { font-size: clamp(40px, 10.7vw, 59px); }
  .hero p { margin: 18px 0 23px; }
  .hero-actions { gap: 8px; }
  .hero .button { padding-inline: 11px; gap: 6px; font-size: 13px; }
  .journal { margin-block: 39px 36px; }
  .section-heading { margin-bottom: 16px; }
  .section-heading .sample-note { font-size: 12px; }
  .journal-grid { grid-template-columns: 1fr; }
  .entry-copy { padding: 14px 16px 16px; }
  .tools { padding: 22px 14px 14px; }
  .tool-grid { gap: 8px; }
  .tool-card { min-height: 140px; padding: 12px 10px; }
  .tool-name { font-size: 14px; }
  .tool-arrow { top: 10px; right: 10px; }
  .about { align-items: flex-start; flex-direction: column; gap: 10px; margin-top: 0; padding-block: 29px; }
  .two-fields { grid-template-columns: 1fr; }
  .footer-inner { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding-block: 16px; text-align: center; }
}

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