:root {
  color-scheme: light;
  --ink: #16231f;
  --muted: #65716d;
  --line: #dce3df;
  --paper: #f7f9f7;
  --white: #ffffff;
  --green: #153c35;
  --green-mid: #236a59;
  --green-light: #dceee7;
  --yellow: #f0c75e;
  --blue: #dbe9f5;
  --blue-ink: #28536f;
  --shadow: 0 18px 45px rgba(25, 47, 41, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(21, 60, 53, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 60, 53, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(21, 60, 53, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--green);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 6px;
  border-radius: 6px;
  background: var(--green);
  box-shadow: 3px 3px 0 var(--yellow);
}

.brand-mark span {
  align-self: end;
  background: var(--white);
  border-radius: 1px 1px 0 0;
}

.brand-mark span:nth-child(1) { height: 7px; }
.brand-mark span:nth-child(2) { height: 13px; }
.brand-mark span:nth-child(3) { height: 10px; }

.header-note {
  color: var(--muted);
  font-size: 13px;
}

.intro {
  display: grid;
  min-height: 405px;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  gap: 8%;
  padding: 64px 0 58px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--green-mid);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.intro h1 {
  margin: 0;
  color: var(--green);
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(48px, 6.2vw, 78px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.lead {
  max-width: 580px;
  margin: 24px 0 0;
  color: #52615c;
  font-size: 17px;
  line-height: 1.9;
}

.sheet-preview {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #cbd7d1;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow), 10px 10px 0 var(--yellow);
  transform: rotate(1deg);
}

.sheet-preview::after {
  position: absolute;
  right: -26px;
  bottom: -26px;
  width: 88px;
  height: 88px;
  border: 14px solid var(--green-light);
  border-radius: 50%;
  content: "";
}

.preview-topbar {
  display: flex;
  height: 48px;
  align-items: center;
  gap: 7px;
  padding: 0 16px;
  background: var(--green);
  color: #e8f3ef;
  font-size: 13px;
}

.preview-topbar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8fa8a1;
}

.preview-topbar span:first-child {
  background: var(--yellow);
}

.preview-topbar strong {
  margin-left: auto;
  font-weight: 600;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  padding: 18px;
  font-size: 13px;
}

.preview-grid span {
  min-width: 0;
  padding: 12px 10px;
  border-right: 1px solid #e4e9e6;
  border-bottom: 1px solid #e4e9e6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-grid span:nth-child(3n + 1) {
  border-left: 1px solid #e4e9e6;
}

.preview-grid span:nth-child(-n + 3) {
  border-top: 1px solid #e4e9e6;
}

.preview-grid .cell-label {
  background: #eef4f1;
  color: var(--green);
  font-weight: 700;
}

.cell-result {
  color: var(--green-mid);
  font-weight: 700;
}

.downloads {
  padding: 66px 0 42px;
  border-top: 1px solid rgba(21, 60, 53, 0.16);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.section-heading > p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
}

.file-list {
  border-top: 1px solid var(--line);
}

.file-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 28px 4px;
  border-bottom: 1px solid var(--line);
}

.file-icon {
  display: grid;
  width: 52px;
  height: 60px;
  place-items: center;
  border: 1px solid #bdd6cc;
  border-radius: 5px;
  background: var(--green-light);
  color: var(--green);
  box-shadow: 4px 4px 0 #c7ddd4;
}

.file-icon span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 3px;
  background: var(--green);
  color: var(--white);
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.file-icon-alt {
  border-color: #bfd1df;
  background: var(--blue);
  box-shadow: 4px 4px 0 #c8d9e6;
}

.file-icon-alt span {
  background: var(--blue-ink);
}

.file-main {
  min-width: 0;
}

.file-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-title-line h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.45;
}

.file-tag {
  flex: none;
  padding: 3px 8px;
  border: 1px solid #bcd6cc;
  border-radius: 4px;
  background: #edf7f3;
  color: var(--green-mid);
  font-size: 11px;
  font-weight: 700;
}

.file-tag-alt {
  border-color: #c4d7e4;
  background: #eff6fb;
  color: var(--blue-ink);
}

.file-main > p {
  max-width: 720px;
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: #75807c;
  font-size: 12px;
}

.file-meta span:not(:first-child)::before {
  margin-right: 20px;
  color: #b2bcb8;
  content: "·";
}

.download-button {
  display: inline-flex;
  min-width: 132px;
  height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid var(--green);
  border-radius: 5px;
  background: var(--green);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.download-button:hover {
  background: var(--green-mid);
  box-shadow: 0 7px 18px rgba(21, 60, 53, 0.18);
  transform: translateY(-2px);
}

.download-button:focus-visible {
  outline: 3px solid rgba(240, 199, 94, 0.8);
  outline-offset: 3px;
}

.download-button.is-downloading {
  background: var(--green-mid);
}

.download-symbol {
  font-size: 19px;
  line-height: 1;
}

.notice {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  margin: 26px 0 74px;
  padding: 20px 22px;
  border-left: 4px solid var(--yellow);
  background: #fffdf5;
}

.notice-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #5b4714;
  font-family: Georgia, serif;
  font-weight: 700;
}

.notice h2 {
  margin: 0 0 2px;
  font-size: 15px;
}

.notice p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

footer {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(21, 60, 53, 0.14);
  color: #7b8581;
  font-size: 12px;
}

footer p {
  margin: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: #193a33;
  box-shadow: 0 12px 30px rgba(9, 29, 24, 0.24);
  color: var(--white);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #79d4a9;
  box-shadow: 0 0 0 4px rgba(121, 212, 169, 0.15);
}

@media (max-width: 820px) {
  .intro {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 56px 0 62px;
  }

  .sheet-preview {
    width: min(100%, 560px);
  }

  .file-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .download-button {
    grid-column: 2;
    width: fit-content;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: calc(100% - 28px);
  }

  .site-header {
    min-height: 64px;
  }

  .header-note {
    display: none;
  }

  .intro {
    gap: 38px;
    padding: 44px 0 54px;
  }

  .intro h1 {
    font-size: 48px;
  }

  .lead {
    margin-top: 18px;
    font-size: 15px;
  }

  .sheet-preview {
    width: 100%;
    box-shadow: var(--shadow), 6px 6px 0 var(--yellow);
    transform: none;
  }

  .preview-grid {
    padding: 12px;
    font-size: 11px;
  }

  .preview-grid span {
    padding: 10px 7px;
  }

  .downloads {
    padding-top: 52px;
  }

  .section-heading {
    align-items: start;
  }

  .section-heading > p {
    padding-top: 29px;
    font-size: 12px;
    white-space: nowrap;
  }

  .file-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    padding: 24px 0 28px;
  }

  .file-icon {
    width: 42px;
    height: 50px;
    box-shadow: 3px 3px 0 #c7ddd4;
  }

  .file-icon-alt {
    box-shadow: 3px 3px 0 #c8d9e6;
  }

  .file-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .file-title-line h3 {
    font-size: 16px;
  }

  .file-main > p {
    font-size: 13px;
  }

  .file-meta {
    gap: 5px 12px;
  }

  .file-meta span:not(:first-child)::before {
    margin-right: 12px;
  }

  .download-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .notice {
    margin-bottom: 48px;
    padding: 17px 16px;
  }

  footer {
    min-height: 94px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    left: 14px;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
