/* Ooh Studio — shared styles for home and list pages (lessons keep their own styles) */
:root {
  --paper: #f6f1e7;
  --paper-2: #efe7d8;
  --card: #fffdf8;
  --ink: #1f1b16;
  --muted: #6b6358;
  --line: #d9cfbe;
  --accent: #b8432f;
  --accent-ink: #ffffff;
  --shadow: 4px 4px 0 #1f1b16;
  --shadow-hover: 7px 7px 0 #1f1b16;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16130f; --paper-2: #1e1a15; --card: #221d17; --ink: #efe8dc; --muted: #a89f90;
    --line: #3a332a; --accent: #e0765f; --accent-ink: #16130f;
    --shadow: 4px 4px 0 #000; --shadow-hover: 7px 7px 0 #000;
  }
}
:root[data-theme="dark"] {
  --paper: #16130f; --paper-2: #1e1a15; --card: #221d17; --ink: #efe8dc; --muted: #a89f90;
  --line: #3a332a; --accent: #e0765f; --accent-ink: #16130f;
  --shadow: 4px 4px 0 #000; --shadow-hover: 7px 7px 0 #000;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.8;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* header */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 900; font-size: 18px; }
.brand svg { width: 28px; height: 28px; flex: none; }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.search-btn:hover { color: var(--ink); border-color: var(--ink); }
.search-btn svg { width: 16px; height: 16px; }
.search-btn kbd { font-family: var(--sans); font-size: 13px; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; }
@media (max-width: 560px) { .search-btn kbd, .search-btn .label { display: none; } }

/* hero */
.hero { padding-top: 56px; padding-bottom: 40px; }
.eyebrow { color: var(--accent); font-size: 13px; letter-spacing: .2em; font-weight: 500; }
.hero h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(40px, 9vw, 72px); line-height: 1.2; margin: 8px 0 20px; }
.hero .lead { font-size: 18px; color: var(--muted); max-width: 36em; margin: 0; }
.hero .lead strong { color: var(--ink); font-weight: 500; }

/* method steps */
.steps { display: grid; gap: 12px; margin: 32px 0 0; padding: 0; list-style: none; counter-reset: s; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--paper-2); border-left: 3px solid var(--accent); padding: 14px 16px; }
.steps b { font-family: var(--serif); font-size: 18px; display: block; }
.steps span { color: var(--muted); font-size: 14px; }

/* sections */
.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section h2 { font-family: var(--serif); font-weight: 900; font-size: 28px; margin: 0 0 6px; }
.section .note { color: var(--muted); margin: 0 0 24px; font-size: 15px; }

/* lesson cards */
.cards { display: grid; gap: 24px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  display: flex; flex-direction: column; text-decoration: none; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--ink); box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover, .card:focus-visible { transform: translate(-3px, -3px); box-shadow: var(--shadow-hover); outline: none; }
.card img { aspect-ratio: 1200 / 630; width: 100%; height: auto; object-fit: cover; border-bottom: 1.5px solid var(--ink); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.chip { align-self: flex-start; font-size: 13px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0 10px; }
.card h3 { font-family: var(--serif); font-weight: 900; font-size: 21px; line-height: 1.4; margin: 0; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.card blockquote { margin: 0; padding: 8px 12px; background: var(--paper-2); font-size: 15px; }
.card blockquote small { display: block; color: var(--muted); font-size: 13px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 500; font-size: 15px; }
.card .go svg { width: 18px; height: 18px; transition: transform .15s ease; }
.card:hover .go svg { transform: translateX(4px); }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; color: var(--accent); font-weight: 500; text-underline-offset: 4px; }

/* works placeholder */
.placeholder { border: 1.5px dashed var(--line); padding: 32px 20px; text-align: center; color: var(--muted); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.foot a { text-underline-offset: 3px; }

/* search overlay */
.sx { position: fixed; inset: 0; z-index: 50; background: rgba(20, 16, 12, .55); display: none; padding: 10vh 16px 16px; }
.sx.open { display: block; }
.sx-box { max-width: 640px; margin: 0 auto; background: var(--card); border: 1.5px solid var(--ink); box-shadow: var(--shadow); }
.sx-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sx-in svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.sx-in input { flex: 1; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 18px; outline: none; min-width: 0; }
.sx-in button { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.sx-list { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow: auto; }
.sx-list a { display: block; padding: 10px 12px; text-decoration: none; border-radius: 4px; }
.sx-list a.on, .sx-list a:hover { background: var(--paper-2); }
.sx-list b { display: block; font-family: var(--serif); font-size: 17px; }
.sx-list span { display: block; color: var(--muted); font-size: 14px; line-height: 1.6; }
.sx-list mark { background: none; color: var(--accent); font-weight: 700; }
.sx-empty { padding: 16px 18px; color: var(--muted); font-size: 15px; }
.sx-in input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
