:root {
    --bg: #f7f8f6; --card: #ffffff; --text: #1a211d; --muted: #5a665f; --line: #dde2de;
    --accent: #146c43; --accent-text: #ffffff; --soft: #e8f1ec; --danger: #a8281c;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #101412; --card: #181e1b; --text: #e7ece9; --muted: #9eaba3; --line: #2b342f;
        --accent: #5fca92; --accent-text: #08231a; --soft: #1b2b23; --danger: #ff9086;
    }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
header { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
    padding: 14px max(16px, calc((100% - 960px) / 2)); border-bottom: 1px solid var(--line); background: var(--card); }
header a { text-decoration: none; }
.brand { font-weight: 700; font-size: 1.2rem; color: var(--text); }
nav { display: flex; gap: 18px; align-items: center; }
nav form { margin: 0; }
main { max-width: 992px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 8px 0; }
h2 { font-size: 1.15rem; margin: 32px 0 8px; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }
.error { color: var(--danger); font-weight: 600; }
.ok { background: var(--soft); padding: 10px 14px; border-radius: 8px; }
.text { white-space: pre-line; max-width: 68ch; }

button, .button { display: inline-block; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px;
    padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.link { background: none; color: var(--accent); padding: 0; font-weight: 400; }
button.danger { background: transparent; color: var(--danger); border: 1px solid currentColor; padding: 6px 12px; }
input, textarea { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; max-width: 100%; }
input[type=checkbox] { width: 18px; height: 18px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.stack { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; max-width: 640px; }
.stack label { display: flex; flex-direction: column; gap: 4px; width: 100%; font-weight: 600; }
.stack label.check, label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.narrow { max-width: 360px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }

.banner { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
    background: var(--soft); border-radius: 12px; padding: 16px 18px; margin-bottom: 20px; }
.banner p { margin: 4px 0 0; }
.search { display: flex; gap: 8px; margin-bottom: 18px; }
.search input { flex: 1; min-width: 0; }

.apps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.apps a { display: flex; gap: 14px; height: 100%; padding: 14px; background: var(--card); border: 1px solid var(--line);
    border-radius: 12px; text-decoration: none; color: var(--text); }
.apps a:hover { border-color: var(--accent); }
.apps a > span:last-child { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }

.icon { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; flex: none; }
.letter { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-text); font-size: 1.5rem; font-weight: 700; }
.app-head { display: flex; gap: 18px; align-items: flex-start; }
.app-head .icon { width: 88px; height: 88px; border-radius: 20px; }
.app-head h1 { margin-top: 0; }
.shots { display: flex; gap: 12px; overflow-x: auto; padding: 16px 0; }
.shots img { height: 360px; border-radius: 12px; border: 1px solid var(--line); }
.shots figure { margin: 0; text-align: center; }

dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; }
dt { color: var(--muted); }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
code { font-size: .9em; overflow-wrap: anywhere; }
main:has(table) { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
td .row { margin: 0; }
