@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@500&family=Manrope:wght@500;600;700;800&family=Noto+Sans+SC:wght@500;700;900&display=swap');

:root {
  --canvas: #f3f7f4;
  --surface: #ffffff;
  --surface-mint: #def3ec;
  --ink: #123f36;
  --muted: #648078;
  --mint: #69d1b5;
  --amber: #ffae19;
  --line: #d4e4de;
  --shadow: 0 14px 36px rgba(18, 63, 54, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--canvas); font-family: 'Manrope', 'Noto Sans SC', sans-serif; -webkit-tap-highlight-color: rgba(105, 209, 181, .2); }
a { touch-action: manipulation; }
h1, h2 { text-wrap: balance; scroll-margin-top: 24px; }
.site-frame { width: min(1240px, calc(100% - 40px)); margin: 0 auto; }
.skip-link { position: fixed; z-index: 10; top: 12px; left: 12px; padding: 10px 14px; color: #fff; background: var(--ink); border-radius: 6px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); align-items: start; gap: clamp(32px, 6vw, 88px); min-height: 540px; padding: clamp(64px, 8vw, 104px) clamp(28px, 5vw, 64px); background: var(--surface-mint); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.eyebrow { display: flex; align-items: center; gap: 13px; margin: 0; font-family: 'Noto Sans SC', sans-serif; font-size: clamp(16px, 1.5vw, 20px); font-weight: 700; letter-spacing: .12em; }
.eyebrow span { width: 8px; height: 8px; flex: 0 0 auto; background: var(--amber); border-radius: 50%; box-shadow: 0 0 0 5px rgba(255, 174, 25, .13); }
h1 { margin: 28px 0 0; font-family: 'Noto Sans SC', sans-serif; font-size: clamp(48px, 6.2vw, 80px); font-weight: 900; line-height: 1.08; letter-spacing: 0; }
h1 strong { color: var(--mint); font-weight: 900; }
.hero-logo { display: block; width: 100%; height: auto; border-radius: 12px; }

.tools-section { padding: 76px 0 84px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-heading p { margin: 0 0 8px; color: var(--muted); font: 500 12px 'DM Mono', monospace; letter-spacing: .12em; }
.section-heading h2 { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: 0; }
#tool-count { color: var(--muted); font-size: 13px; }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 20px; }
.tool-card { position: relative; display: flex; min-width: 0; min-height: 248px; flex-direction: column; justify-content: space-between; padding: 24px; overflow: hidden; color: var(--ink); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 22px rgba(18, 63, 54, .05); transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease, background-color .24s ease; }
.tool-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; content: ''; background: var(--mint); opacity: 0; transform: scaleY(.4); transform-origin: center; transition: transform .24s ease, opacity .24s ease; }
.tool-card::after { position: absolute; top: 22px; right: 24px; content: '↗'; font-size: 22px; transition: transform .24s ease; }
.tool-card:hover { background: #e8f7f2; border-color: var(--mint); box-shadow: var(--shadow); transform: translateY(-6px); }
.tool-card:hover::before { opacity: 1; transform: scaleY(1); }
.tool-card:hover::after { transform: translate(3px, -3px); }
.tool-card:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.tool-index { color: var(--muted); font: 500 12px 'DM Mono', monospace; letter-spacing: .04em; }
.tool-card-body { display: grid; grid-template-columns: minmax(0, 1fr) 124px; align-items: start; gap: 14px; min-height: 142px; padding-top: 22px; }
.tool-copy { min-width: 0; }
.tool-name { display: block; margin: 0 0 10px; font-family: 'Noto Sans SC', sans-serif; font-size: 25px; font-weight: 900; line-height: 1.25; letter-spacing: 0; }
.tool-description { display: block; color: var(--muted); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.tool-art { display: block; width: 124px; height: 124px; object-fit: cover; border-radius: 8px; mix-blend-mode: multiply; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0 36px; border-top: 1px solid var(--line); }
.footer-logo { display: block; width: 190px; height: auto; border-radius: 8px; }
.footer-meta { display: flex; align-items: center; gap: 18px; color: var(--muted); }
.footer-meta p { margin: 0; font-size: 13px; }
.footer-qr { display: block; width: 88px; height: 88px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; }
.filing-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; max-width: 470px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.filing-item { display: inline-flex; align-items: center; gap: 5px; min-height: 20px; white-space: nowrap; }
.filing-item img { display: block; width: 20px; height: 20px; object-fit: contain; }
.filing-links a { color: var(--muted); text-decoration: none; }
.filing-links a:hover, .filing-links a:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: minmax(0, 1fr) 290px; }
}

@media (max-width: 640px) {
  .site-frame { width: min(100% - 28px, 520px); }
  .hero { grid-template-columns: 1fr; gap: 36px; min-height: 0; padding: 52px 24px 28px; }
  .hero-logo { width: min(280px, 100%); }
  h1 { font-size: clamp(42px, 12vw, 58px); }
  .tools-section { padding: 54px 0 62px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .tool-grid { grid-template-columns: 1fr; gap: 14px; }
  .tool-card { min-height: 224px; }
  .tool-card-body { grid-template-columns: minmax(0, 1fr) 112px; }
  .tool-art { width: 112px; height: 112px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .footer-meta { width: 100%; justify-content: space-between; }
  .filing-links { justify-content: flex-start; max-width: none; }
}

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