:root {
  --bg: #f6f6f8; --bg-card: #fff; --text: #17171c; --text-2: #4a4a55; --muted: #80808c; --border: #e3e3ea;
  --accent: #ff5a1f; --accent-hover: #e04a12; --accent-soft: #fff0e9; --header-bg: #0f0f14; --header-text: #e6e6ec;
  --ok: #1b8a5a; --warn: #b45309; --shadow: 0 1px 2px rgba(0,0,0,.06); --shadow-hover: 0 6px 20px rgba(0,0,0,.1);
  --mono: "SF Mono", "Fira Code", "JetBrains Mono", Consolas, monospace;
}
[data-theme="dark"] {
  --bg: #0f0f14; --bg-card: #17171f; --text: #e2e2ea; --text-2: #b0b0bd; --muted: #76768a; --border: #2a2a38;
  --accent: #ff6a33; --accent-hover: #ff8555; --accent-soft: #2a1a12; --header-bg: #09090d; --header-text: #e6e6ec;
  --shadow: 0 1px 2px rgba(0,0,0,.5); --shadow-hover: 0 6px 20px rgba(0,0,0,.6);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: light; } [data-theme="dark"] { color-scheme: dark; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; } a:hover { color: var(--accent-hover); text-decoration: underline; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem; width: 100%; }
main.wrap { flex: 1; padding-top: 1.5rem; padding-bottom: 3rem; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: .4rem 0 .8rem; letter-spacing: -.02em; }
h2 { font-size: 1.3rem; margin: 2rem 0 .8rem; letter-spacing: -.01em; } h3 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
p { margin: 0 0 .9rem; } ul, ol { margin: 0 0 1rem 1.3rem; } code { font-family: var(--mono); font-size: .9em; background: var(--border); padding: .05em .35em; border-radius: 4px; }
pre { background: var(--header-bg); color: var(--header-text); padding: 1rem; border-radius: 8px; overflow: auto; margin: 0 0 1rem; } pre code { background: none; padding: 0; }
.muted { color: var(--muted); } .lead { font-size: 1.1rem; color: var(--text-2); } .hint { font-size: .8rem; color: var(--muted); margin: .25rem 0 0; } .err { color: #e5534b; font-size: .85rem; margin: .25rem 0 0; }
.notice { background: var(--accent-soft); border: 1px solid var(--accent); padding: .6rem .9rem; border-radius: 8px; }
.empty { color: var(--muted); padding: 1.5rem; border: 1px dashed var(--border); border-radius: 10px; text-align: center; }

header { background: var(--header-bg); color: var(--header-text); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid #222; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; flex-wrap: wrap; }
.logo { font-family: var(--mono); font-weight: 700; font-size: 1.2rem; color: var(--header-text); letter-spacing: -.02em; } .logo span { color: var(--accent); } .logo:hover { text-decoration: none; }
nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; } nav a { color: var(--header-text); font-size: .92rem; } nav a.cta { background: var(--accent); color: #fff; padding: .3rem .8rem; border-radius: 6px; font-weight: 600; } nav a.cta:hover { background: var(--accent-hover); text-decoration: none; }
#theme-toggle { background: none; border: 1px solid #444; color: var(--header-text); border-radius: 6px; padding: .2rem .5rem; cursor: pointer; font-size: 1rem; }

footer { border-top: 1px solid var(--border); padding: 1.5rem 0; font-size: .85rem; color: var(--muted); }

.hero { text-align: center; padding: 2rem 0 1rem; } .hero h1 { font-size: 2.4rem; } .hero .lead { max-width: 760px; margin: 0 auto 1.2rem; }
.search { display: flex; max-width: 680px; margin: 0 auto; gap: .5rem; } .search input { flex: 1; font-size: 1.05rem; padding: .75rem 1rem; }
.stats { color: var(--muted); font-size: .9rem; margin-top: 1rem; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; } .postlist { list-style: none; margin: 0; } .postlist li { padding: .35rem 0; border-bottom: 1px solid var(--border); }
.chips { list-style: none; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; } .chips a { display: inline-block; background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px; padding: .3rem .9rem; font-size: .9rem; color: var(--text); } .chips a:hover { border-color: var(--accent); text-decoration: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.thumb { display: block; aspect-ratio: 16/10; background: var(--border); overflow: hidden; } .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--muted); }
.card-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem; } .card h3 { margin: 0; font-size: 1.05rem; } .card h3 a { color: var(--text); }
.byline { font-size: .85rem; color: var(--text-2); margin: 0; } .summary { font-size: .92rem; color: var(--text-2); margin: 0; flex: 1; } .meta { font-size: .85rem; margin: .3rem 0 0; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .15rem .5rem; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.badge.free { background: #e6f6ee; color: var(--ok); } [data-theme="dark"] .badge.free { background: #0f2a1d; color: #3ec98a; }
.stars .s { color: #f5a623; letter-spacing: .05em; } .stars.small { font-size: .85rem; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; } .filters input[type=search] { flex: 1 1 220px; }
input[type=text], input[type=search], input[type=email], input[type=url], select, textarea { font: inherit; font-size: .95rem; padding: .55rem .7rem; color: var(--text); background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; width: 100%; }
.filters select, .filters button { width: auto; } textarea { min-height: 7rem; resize: vertical; }
button, .btn { font: inherit; font-size: .95rem; padding: .55rem 1rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); cursor: pointer; display: inline-block; }
.btn:hover, button:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary, button.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; } .btn.primary:hover { background: var(--accent-hover); color: #fff; }
.btn.danger { color: #e5534b; } button.link { background: none; border: none; color: var(--accent); padding: 0; font-size: inherit; cursor: pointer; } button.link:hover { text-decoration: underline; }
.inline { display: inline; } .hp { position: absolute; left: -9999px; }
.pager { display: flex; justify-content: space-between; margin: 1.5rem 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }

.ext-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.shot img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; }
.actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; } .links { font-size: .9rem; }
.rate { display: flex; align-items: center; gap: .1rem; font-size: .9rem; } .rate span { margin-right: .4rem; } .rate .star { background: none; border: none; font-size: 1.5rem; color: var(--border); padding: 0 .1rem; cursor: pointer; line-height: 1; } .rate .star.on, .rate .star:hover, .rate .star:hover ~ .star.on { color: #f5a623; }
.ext-body { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; margin-top: 1rem; }
.specs { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; align-self: start; } .specs h2 { margin-top: 0; font-size: 1.05rem; }
.specs dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem; font-size: .9rem; } .specs dt { color: var(--muted); } .specs dd { word-break: break-word; }
.ownerbar { display: flex; gap: .5rem; margin: 1rem 0; padding: .6rem; background: var(--accent-soft); border-radius: 8px; }
.comments ul { list-style: none; margin: 0; } .comment { padding: .8rem 0; border-top: 1px solid var(--border); } .comment p:last-child { margin-bottom: 0; }
.comment-form { margin-top: 1rem; } .comment-form label { display: block; font-weight: 600; margin-bottom: .3rem; } .comment-form button { margin-top: .5rem; }

.form { max-width: 820px; } .form.narrow, .narrow { max-width: 520px; } .field { margin: .9rem 0; } .field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; } fieldset { border: 1px solid var(--border); border-radius: 10px; padding: .6rem 1rem 1rem; margin: 1rem 0; } legend { font-weight: 700; padding: 0 .4rem; }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1rem; } .checks label, fieldset > label { font-weight: 400; display: inline-flex; gap: .35rem; align-items: center; margin-right: 1rem; }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; } .list th, .list td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--border); }
.authors { list-style: none; margin: 0; columns: 2; gap: 2rem; } .authors li { break-inside: avoid; padding: .4rem 0; } .authors li p { margin: 0; font-size: .85rem; }
.posts { list-style: none; margin: 0; } .posts li { padding: 1rem 0; border-bottom: 1px solid var(--border); } .posts h2 { margin: 0 0 .2rem; font-size: 1.25rem; }
.post { max-width: 760px; } .post h2 { margin-top: 1.8rem; } .post img { max-width: 100%; } .post table { border-collapse: collapse; margin: 0 0 1rem; } .post td, .post th { border: 1px solid var(--border); padding: .4rem .6rem; text-align: left; } .post blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; color: var(--text-2); margin: 0 0 1rem; }

@media (max-width: 760px) {
  .two, .ext-head, .ext-body, .cols { grid-template-columns: 1fr; } .authors { columns: 1; } .hero h1 { font-size: 1.8rem; } nav { gap: .7rem; } .search { flex-direction: column; }
}
