:root { --teal: #1e5f7b; --teal-light: #e8f1f5; --ink: #1a1d26; --muted: #6b7280; --line: #e5e7eb; --bg: #f7f8fa; --font: -apple-system, BlinkMacSystemFont, Roboto, "Open Sans", "Helvetica Neue", sans-serif; }
* { box-sizing: border-box; margin: 0; }
body { font-family: var(--font); color: var(--ink); line-height: 1.6; background: #fff; }
h1, h2, h3 { font-weight: 600; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* Header — clean, hamburger */
.site-header { border-bottom: 1px solid var(--line); padding: 12px 0; background: #fff; position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { display: block; height: 36px; }
.help-tag { font-size: 1.05rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 12px; margin-left: 2px; }
.hamburger { background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger svg { width: 26px; height: 26px; stroke: var(--ink); }
.nav-menu { display: none; position: absolute; top: 100%; right: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 200px; overflow: hidden; }
.nav-menu.open { display: block; }
.nav-menu a { display: block; padding: 12px 18px; text-decoration: none; color: var(--ink); font-weight: 500; }
.nav-menu a:hover { background: var(--bg); }

/* Hero — tinted like Elfsight */
.hero { background: var(--teal-light); padding: 56px 0 96px; text-align: center; }
.hero h1 { font-size: 2.4rem; margin-bottom: 24px; }
.search-wrap { position: relative; max-width: 600px; margin: 0 auto; }
.search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; stroke: #9ca3af; }
.search-wrap input { width: 100%; padding: 18px 24px 18px 56px; border: 1px solid var(--line); border-radius: 14px; font-size: 1.05rem; background: #fff; }
.search-wrap input:focus { outline: none; border-color: var(--teal); }
#search-results { max-width: 600px; margin: 12px auto 0; text-align: left; background: #fff; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.1); overflow: hidden; display: none; }
.sr-hit { display: block; padding: 12px 20px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.sr-hit:last-child { border-bottom: none; }
.sr-hit:hover { background: var(--bg); }
.sr-hit b { display: block; }
.sr-hit span { font-size: .88rem; color: var(--muted); }
.sr-empty { padding: 16px 20px; color: var(--muted); }

/* Category cards overlapping hero */
.cards-wrap { margin-top: -64px; padding-bottom: 48px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 48px; }
.cat-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 32px 24px; text-align: center; text-decoration: none; color: var(--ink); box-shadow: 0 2px 12px rgba(0,0,0,.06); transition: transform .15s, box-shadow .15s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.cat-icon { width: 64px; height: 64px; margin: 0 auto 16px; background: var(--teal-light); border-radius: 18px; display: flex; align-items: center; justify-content: center; }
.cat-icon svg { width: 32px; height: 32px; stroke: var(--teal); }
.cat-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.cat-card .count { font-size: .88rem; color: var(--muted); }

/* Article pages */
.article { padding: 40px 20px 64px; max-width: 760px; }
.back { color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 16px; }
.article h1 { font-size: 1.9rem; margin-bottom: 12px; }
.lede { font-size: 1.1rem; color: var(--muted); margin-bottom: 24px; }
.steps { margin: 0 0 24px 22px; }
.steps li { margin-bottom: 10px; }
.tip { background: var(--teal-light); border-radius: 12px; padding: 16px 20px; margin-bottom: 24px; }
.cta { display: inline-block; background: var(--teal); color: #fff; padding: 12px 28px; border-radius: 999px; text-decoration: none; font-weight: 600; }
.art-list .art { display: block; padding: 16px 20px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; text-decoration: none; color: var(--ink); }
.art-list .art:hover { border-color: var(--teal); }
.art-list .art b { display: block; font-size: 1.05rem; }
.art-list .art span { color: var(--muted); font-size: .92rem; }

/* Ticket form */
.ticket { border-top: 1px solid var(--line); padding-top: 36px; }
.ticket h2 { margin-bottom: 8px; }
.ticket label { display: block; margin: 16px 0; font-weight: 600; }
.ticket input, .ticket textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 1rem; font-family: inherit; }
.ticket button { background: var(--teal); color: #fff; border: none; padding: 14px 32px; border-radius: 999px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.fine { font-size: .85rem; color: var(--muted); margin-top: 12px; }
.still-stuck { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; }
#tkform label { display: block; margin: 16px 0; font-weight: 600; }
#tkform input, #tkform textarea, #tkform select { display: block; width: 100%; margin-top: 6px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 1rem; font-family: inherit; background: #fff; }
#tkform button { background: var(--teal); color: #fff; border: none; padding: 14px 32px; border-radius: 999px; font-size: 1rem; font-weight: 600; cursor: pointer; }
#tkform button:disabled { opacity: .6; cursor: default; }

.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); background: var(--bg); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
  .hero { padding: 40px 0 80px; }
  .hero h1 { font-size: 1.8rem; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .cat-card { padding: 24px 16px; }
}

.sitemap { background: var(--bg); border-top: 1px solid var(--line); padding: 40px 0; margin-top: 48px; }
.sitemap h3 { font-size: 1.1rem; margin-bottom: 20px; }
.smap-grid { column-count: 2; column-gap: 24px; }
.smap-col { break-inside: avoid; margin-bottom: 24px; }
.smap-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; }
.smap-col ul { list-style: none; padding: 0; }
.smap-col li { margin-bottom: 6px; }
.smap-col a { color: var(--ink); text-decoration: none; font-size: .92rem; }
.smap-col a:hover { color: var(--teal); text-decoration: underline; }

/* Article layout with sidebar (Elfsight-style) */
.article-layout { display: grid; grid-template-columns: 230px 1fr; gap: 44px; max-width: 1080px; }
.article-side { padding: 40px 0 64px; }
.article-side .side-search { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; margin-bottom: 24px; }
.article-side h4 { font-size: 1.05rem; margin-bottom: 12px; }
.article-side ul { list-style: none; padding: 0; }
.article-side li { margin-bottom: 4px; }
.article-side a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: .95rem; }
.article-side a:hover { background: var(--bg); }
.article-side a.current { font-weight: 700; background: var(--teal-light); }
.article-main { min-width: 0; }

/* Numbered step badges */
ol.steps { list-style: none; margin: 0 0 28px; padding: 0; counter-reset: step; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 18px; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; font-size: .9rem; display: flex; align-items: center; justify-content: center; }

/* Screenshots */
.shot { display: block; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.08); margin: 16px 0 24px; }
.shot-cap { font-size: .88rem; color: var(--muted); margin: -16px 0 24px; }

/* Sort dropdown on category pages */
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.cat-head h1 { margin: 0; }
.sort-sel { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: .9rem; background: #fff; color: var(--ink); }

@media (max-width: 820px) {
  .article-layout { grid-template-columns: 1fr; gap: 0; }
  .article-side { display: none; }
}
.article-main { padding: 40px 20px 64px; }
.article-main h1 { font-size: 1.9rem; margin-bottom: 12px; }

/* Article furniture */
.art-foot { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; }
.updated { font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.helpful { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.helpful span { font-weight: 600; }
.helpful button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 22px; font-size: .95rem; cursor: pointer; }
.helpful button:hover { border-color: var(--teal); color: var(--teal); }
.helpful button.picked { background: var(--teal); border-color: var(--teal); color: #fff; }
.helpful .thanks { color: var(--muted); font-size: .92rem; }
.related { margin-bottom: 8px; }
.related h3 { font-size: 1.05rem; margin-bottom: 10px; }
.related ul { list-style: none; padding: 0; }
.related li { margin-bottom: 6px; }
.related a { color: var(--teal); text-decoration: none; }
.related a:hover { text-decoration: underline; }

/* Popular searches */
.sr-pop { padding: 14px 20px; }
.sr-pop span { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.sr-pop button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 14px; margin: 0 6px 6px 0; font-size: .88rem; cursor: pointer; color: var(--ink); }
.sr-pop button:hover { border-color: var(--teal); color: var(--teal); }

/* Most popular */
.pop-wrap { padding: 8px 0 48px; }
.pop-wrap h2 { font-size: 1.4rem; margin-bottom: 18px; }
.pop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pop-grid a { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; text-decoration: none; color: var(--ink); background: #fff; }
.pop-grid a:hover { border-color: var(--teal); }
.pop-grid b { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.pop-grid span { font-size: .9rem; color: var(--muted); }
@media (max-width: 760px) { .pop-grid { grid-template-columns: 1fr; } }
