/* A notebook on a desk: grid paper, kai headings, highlighter, pen blue for
   links. Same tokens as the tools themselves (see watermark's styles.css). */
:root {
  --paper: #ffffff;
  --grid: #e6ecf5;
  --ink: #1d2433;
  --ink-soft: #566076;
  --ink-faint: #6b7488;
  --hl: #ffe14d;
  --pen: #2a4a9a;
  --line: #1d2433;
  --radius: 6px;
  --kai: 'LXGW WenKai TC', 'Kaiti TC', 'BiauKai', 'DFKai-SB', serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pen); }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { padding: 20px 0 8px; }
.brand { font-family: var(--kai); font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
.brand span { color: var(--ink-soft); }

.hero { padding: 24px 0 32px; }
.hero h1 { font-family: var(--kai); font-size: clamp(32px, 6.4vw, 46px); line-height: 1.25; margin: 0; }
.hero h1 mark { background: linear-gradient(transparent 55%, var(--hl) 55%); color: inherit; padding: 0 2px; }
.hero p { margin: 12px 0 0; color: var(--ink-soft); font-size: 17px; }

/* Tool list: each tool is a card taped to the page, slightly off square */
.tools { list-style: none; margin: 0; padding: 0 0 56px; display: grid; gap: 28px; }
@media (min-width: 720px) {
  .tools { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

.tool {
  position: relative;
  display: block;
  height: 100%;
  padding: 26px 22px 20px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  transform: rotate(-0.6deg);
  transition: transform 0.15s;
}
.tool::before {
  content: ""; position: absolute; top: -10px; left: 24px; width: 72px; height: 18px;
  background: var(--hl); opacity: 0.8; transform: rotate(-3deg);
}
.tools li:nth-child(even) .tool { transform: rotate(0.5deg); }
.tool:hover, .tools li:nth-child(even) .tool:hover { transform: rotate(0deg); }
.tool h2 { font-family: var(--kai); font-size: 24px; line-height: 1.3; margin: 0; }
.tool p { margin: 8px 0 0; color: var(--ink-soft); }
.tool .go {
  display: inline-block; margin-top: 14px; font-weight: 700; color: var(--pen);
  text-decoration: underline wavy; text-underline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .tool { transition: none; }
}

.site-footer { padding: 24px 0 40px; color: var(--ink-faint); font-size: 14px; }
