@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("fonts/inter-variable-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("fonts/inter-variable-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;
    --ink: #171714;
    --muted: #6f6d66;
    --paper: #f8f8f8;
    --card: #fffefa;
    --line: #dedbd3;
    --accent: #ff7657;
    --accent-dark: #d94e32;
    --radius: 20px;
    --shadow: 0 16px 45px rgba(27, 25, 19, .07);
    --layout-max: 1920px;
    --layout-gutter: 40px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-height: 100vh; background: var(--paper); }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

.site-header {
    position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: auto minmax(260px, 620px) auto;
    align-items: center; gap: 28px; min-height: 76px; padding: 12px max(var(--layout-gutter), calc((100vw - var(--layout-max)) / 2 + var(--layout-gutter)));
    background: rgba(248, 248, 248, .92); border-bottom: 1px solid rgba(23, 23, 20, .1); backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.brand > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--paper); background: var(--ink); }
.brand--large { font-size: 26px; margin-bottom: 38px; }
.brand--large > span { width: 46px; height: 46px; border-radius: 14px; }
.search { display: flex; min-width: 0; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.75); overflow: hidden; }
.search:focus-within { border-color: #aaa69b; box-shadow: 0 0 0 3px rgba(109,94,245,.1); }
.search input { width: 100%; min-width: 0; padding: 12px 4px 12px 18px; border: 0; outline: 0; background: transparent; }
.search button { width: 48px; border: 0; background: transparent; font-size: 24px; cursor: pointer; }
.header-actions { display: flex; align-items: center;  justify-content: end; gap: 6px; }
.header-actions form { margin: 0; }

.icon-link { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; text-decoration: none; cursor: pointer; }
.icon-link:hover, .icon-link.is-active { background: #e7e3da; }
.icon-link, .hero-actions {
    background-color: white;
    border: 1px solid var(--line);
}
.account-link { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; color: var(--muted); text-decoration: none; }
.account-link svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.account-link:hover, .account-link.is-active { color: var(--ink); background: #e7e3da; }

.page-notice { width: min(1840px, calc(100% - 80px)); margin: 18px auto 0; }
.notice { padding: 13px 16px; border: 1px solid #cfded0; border-radius: 13px; color: #315b36; background: #edf7ee; line-height: 1.45; }
.notice--error { color: #812f27; border-color: #efc4bd; background: #fff0ed; }
.notice--warning { color: #745615; border-color: #ead7a5; background: #fff8e4; }
.feed-health-alert { display: grid; gap: 10px; }
.feed-health-alert__head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.feed-health-alert__head a { flex: 0 0 auto; font-size: 12px; font-weight: 800; text-underline-offset: 3px; }
.feed-health-alert ul { display: grid; gap: 8px; margin: 0; padding-left: 20px; }
.feed-health-alert li { padding-left: 2px; }
.feed-health-alert li > strong { margin-right: 5px; }
.feed-health-alert li > span { line-height: 1.45; }
.feed-health-alert small { display: block; margin-top: 2px; color: #8a6d2c; }

.app-main { width: min(100%, var(--layout-max)); margin: 0 auto; padding: 0 var(--layout-gutter) 70px; }
.feed-strip-wrap {
    margin: 0;
    padding: 22px 0 4px;
    background: #fff;
    box-shadow: 0 0 0 100vmax #fff;
    clip-path: inset(0 -100vmax);
}
.feed-strip { display: flex; gap: 18px; padding: 8px 4px 16px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scroll-snap-type: x proximity; }
.feed-strip { scrollbar-width: none; }
.feed-strip::-webkit-scrollbar { display: none; }
.feed-chip { position: relative; display: flex; flex: 0 0 82px; flex-direction: column; align-items: center; gap: 8px; max-width: 92px; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; text-decoration: none; scroll-snap-align: start; }
.feed-chip--button { padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; }
.feed-chip > span:last-child { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-chip.is-active { color: var(--ink); }
.feed-chip.is-active .feed-avatar { outline: 3px solid var(--feed-color, var(--ink)); outline-offset: 3px; }
.feed-avatar { position: relative; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 19px; color: white; background: var(--feed-color, #8e8a80); font-size: 22px; font-weight: 800; overflow: visible; }
.feed-avatar img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.feed-avatar--all { background: var(--ink); }
.feed-chip--add .feed-avatar { color: var(--ink); background: transparent; border: 1px dashed #aaa69d; }
.feed-count { position: absolute; top: -7px; right: -8px; display: grid; place-items: center; min-width: 23px; height: 23px; padding: 0 6px; border: 3px solid var(--paper); border-radius: 999px; color: white; background: var(--accent-dark); font-size: 10px; }

.view-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px 0; bborder-bottom: 1px solid var(--line); }
.view-tabs { display: flex; gap: 6px; overflow-x: auto; }
.view-tabs a { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background-color: white; font-size: 14px; font-weight: 450; text-decoration: none; white-space: nowrap; }
.view-tabs a:hover { background: #e9e5dc; }
.view-tabs a.is-active { color: var(--paper); background: var(--ink); }
.view-actions, .inline-actions { display: flex; align-items: center; gap: 14px; }
.view-actions form, .inline-actions form { margin: 0; }
.settings-intro h1 { margin: 2px 0 0; font: 700 clamp(34px, 5vw, 40px)/1.05 "Inter", sans-serif; letter-spacing: -.045em; }
.eyebrow { margin: 0; color: var(--accent-dark); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }

.item-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 0; }
.item-card { display: flex; min-width: 0; flex-direction: column; border: 1px solid rgba(23,23,20,.1); border-radius: var(--radius); background: var(--card); box-shadow: 0 1px 0 rgba(23,23,20,.04); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease; }
.item-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.item-card.is-seen { opacity: .82; }
.item-card.is-seen:hover { opacity: 1; }
.card-image { position: relative; display: block; aspect-ratio: 16 / 9; color: inherit; background: #d8d4ca; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.item-card:hover .card-image img { transform: scale(1.025); }
.image-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: white; background: var(--feed-color); font: 800 72px/1 Georgia, serif; }
.media-label { position: absolute; left: 12px; bottom: 12px; padding: 7px 10px; border-radius: 999px; color: white; background: rgba(23,23,20,.82); font-size: 11px; font-weight: 800; backdrop-filter: blur(8px); }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--muted); font-size: 11px; }
.feed-label { max-width: 65%; padding: 5px 9px; border: 0; border-radius: 5px; background: var(--feed-color); color: #fff; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card h2 { margin: 0; font: 700 21px/1.24 "Inter", sans-serif; letter-spacing: -.025em; }
.item-card h2 a { text-decoration: none; }
.item-card h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card-summary { display: -webkit-box; margin: 13px 0 18px; color: #55534d; font-size: 14px; line-height: 1.55; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.card-footer { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 13px; border-top: 1px solid #ebe8e1; }
.card-actions { display: flex; gap: 6px; }
.state-button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font-size: 11px; font-weight: 550; cursor: pointer; }
.state-button:hover { border-color: #9f9b92; }
.state-button.is-active { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.list-picker { position: relative; }
.list-picker summary { list-style: none; }
.list-picker summary::-webkit-details-marker { display: none; }
.list-picker.has-membership .list-picker__toggle { border-color: var(--ink); }
.list-picker__backdrop { position: fixed; z-index: 40; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(23,23,20,.28); cursor: default; backdrop-filter: blur(2px); }
.list-picker__menu { position: fixed; z-index: 41; top: 50%; left: 50%; display: grid; width: min(310px, calc(100vw - 32px)); max-height: min(70vh, 420px); padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: 0 20px 60px rgba(23,23,20,.22); gap: 5px; overflow-y: auto; transform: translate(-50%, -50%); }
.list-picker__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 3px 9px 6px; }
.list-picker__head strong { font-size: 13px; }
.list-picker__close { display: grid; place-items: center; width: 31px; height: 31px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 20px; line-height: 1; cursor: pointer; }
.list-picker__close:hover { border-color: var(--ink); }
.list-option { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; padding: 8px 7px; border: 0; border-radius: 9px; background: transparent; font-size: 12px; text-align: left; cursor: pointer; }
.list-option:hover { background: #f0ede6; }
.list-option__check { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid #bbb7ad; border-radius: 6px; font-size: 12px; font-weight: 900; }
.list-option.is-active .list-option__check { color: var(--paper); border-color: var(--ink); background: var(--ink); }
.list-picker__manage { margin-top: 5px; padding: 9px 7px 3px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 550; text-decoration: none; }
.list-picker__manage:hover { color: var(--ink); }
.item-card:has(.list-picker[open]) { z-index: 30; overflow: visible; transform: none; }
.item-card:has(.list-picker[open]) .card-image { border-radius: var(--radius) var(--radius) 0 0; }
.has-list-picker-open { overflow: hidden; }
.author { max-width: 36%; color: var(--muted); font-size: 10px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px; border: 1px solid #bbb7ad; border-radius: 999px; background: transparent; font-weight: 450; text-decoration: none; cursor: pointer; }
.button:hover { border-color: var(--ink); }
.button--primary { color: var(--paper); border-color: var(--ink); background: var(--ink); }
.button--primary:hover { background: #32322e; }
.button--small { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.feed-actions .button { min-height: 0; padding: 9px 14px; border-color: var(--line); color: var(--muted); background-color: white; font-size: 14px; line-height: 1.5; }
.feed-actions .button:hover { border-color: var(--line); background-color: #e9e5dc; }
.text-button { padding: 4px 0; border: 0; color: var(--muted); background: none; font-size: 12px; font-weight: 550; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; cursor: pointer; text-decoration: underline;}
.text-button:hover { color: var(--ink); text-decoration-color: currentColor; }
.text-button--danger { color: var(--accent-dark);}

.app-modal { width: min(640px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px)); padding: 25px; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: var(--card); box-shadow: 0 24px 80px rgba(23,23,20,.24); overflow-y: auto; }
.app-modal--narrow { width: min(520px, calc(100vw - 32px)); }
.app-modal::backdrop { background: rgba(23,23,20,.3); backdrop-filter: blur(3px); }
.app-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.app-modal__head h2 { margin: 3px 0 0; font: 700 27px/1.15 "Inter", sans-serif; letter-spacing: -.025em; }
.app-modal__close { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 22px; line-height: 1; cursor: pointer; }
.app-modal__close:hover { border-color: var(--ink); }
.app-modal__form { margin-top: 22px; }
.app-modal .user-create-form { grid-template-columns: 1fr; }
.app-modal__form > .button { justify-self: start; }
.has-app-modal-open { overflow: hidden; }

.empty-state { display: grid; place-items: center; min-height: 410px; margin-top: 22px; padding: 50px 20px; border: 1px dashed #bbb7ad; border-radius: var(--radius); text-align: center; }
.empty-state > span { font-size: 48px; }
.empty-state h2 { margin: 15px 0 4px; font: 700 28px/1.2 "Inter", sans-serif; }
.empty-state p { margin: 0 0 22px; color: var(--muted); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 35px 0 0; color: var(--muted); font-size: 13px; }

.settings-layout { width: min(100%, var(--layout-max)); margin: 0 auto; padding: 48px var(--layout-gutter) 70px; }
.settings-intro { margin-bottom: 28px; }
.settings-intro .muted { max-width: 680px; }
.section-title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.section-title-row > :first-child { min-width: 0; }
.section-title-row .button { flex: 0 0 auto; margin-left: auto; }
.settings-intro__action { margin-bottom: 5px; }
.muted, .microcopy { color: var(--muted); line-height: 1.55; }
.settings-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.settings-card h2 { margin: 0 0 18px; font: 700 24px/1.2 "Inter", sans-serif; }
.section-title-row--card { align-items: center; margin-bottom: 18px; }
.settings-card .section-title-row--card h2 { margin: 0; }
.settings-form { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 15px; align-items: end; }
.settings-form label, .stack-form label { display: flex; flex-direction: column; gap: 7px; color: #53514b; font-size: 12px; font-weight: 550; }
.settings-form input:not([type=color]), .stack-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: white; outline: none; }
.settings-form input:focus, .stack-form input:focus { border-color: #99958b; box-shadow: 0 0 0 3px rgba(109,94,245,.09); }
.settings-form input[type=color] { width: 100%; height: 44px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.span-2 { grid-column: span 2; }
.optional { color: #99958b; font-weight: 500; }
.feed-sort-help { display: flex; align-items: center; gap: 8px; min-height: 22px; margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.feed-sort-help [data-feed-sort-status] { color: #397145; font-weight: 550; }
.feed-settings-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.feed-settings-item {
    display: grid;
    grid-template-columns: minmax(250px, .85fr) minmax(480px, 1.7fr) auto;
    grid-template-areas:
        "head form actions"
        "meta form actions"
        "error error error";
    align-items: center;
    column-gap: 22px;
    padding: 14px 16px;
    transition: opacity .16s ease, box-shadow .16s ease, transform .16s ease;
}
.feed-settings-item.is-dragging { z-index: 2; opacity: .58; box-shadow: var(--shadow); transform: scale(.99); }
.feed-settings-list.is-sorting { user-select: none; }
.feed-settings-head { display: grid; grid-area: head; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 11px; min-width: 0; }
.feed-settings-head .feed-avatar { width: 46px; height: 46px; border-radius: 14px; font-size: 18px; }
.feed-settings-title { min-width: 0; }
.feed-settings-head h2 { margin: 0 0 2px; font-size: 18px; }
.feed-settings-head a { display: block; max-width: 100%; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drag-handle { display: grid; place-items: center; width: 34px; height: 44px; padding: 0; border: 0; border-radius: 10px; color: #858178; background: transparent; font-size: 24px; line-height: 1; cursor: grab; touch-action: none; user-select: none; }
.drag-handle:hover, .drag-handle:focus-visible { color: var(--ink); background: #eeebe4; outline: none; }
.drag-handle:active { cursor: grabbing; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; }
.status-dot--ok { background: #49a15b; box-shadow: 0 0 0 4px #e5f3e8; }
.status-dot--error { background: #cf4739; box-shadow: 0 0 0 4px #f8e5e2; }
.feed-error { grid-area: error; margin: 10px 0 0; padding: 9px 11px; border-radius: 10px; color: #8a332a; background: #fff0ed; font-size: 12px; }
.microcopy { grid-area: meta; margin: 3px 0 0 91px; font-size: 10px; }
.compact-form {
    display: grid;
    grid-area: form;
    grid-template-columns: minmax(150px, 1fr) 68px minmax(180px, .9fr) auto;
    gap: 10px;
    align-items: end;
    padding: 0;
    border-top: 0;
}
.compact-form .feed-name-field, .compact-form .feed-color-field, .compact-form .feed-thumbnail-field { grid-column: auto; }
.compact-form input:not([type=color]) { min-height: 40px; padding-block: 7px; }
.compact-form input[type=color] { height: 40px; }
.compact-form .button { min-height: 40px; }
.feed-settings-item > .inline-actions { grid-area: actions; align-items: flex-end; flex-direction: column; gap: 5px; margin: 0; }
.feed-settings-item > .inline-actions .text-button { white-space: nowrap; }

.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 80% 12%, #ffdad0 0, transparent 30%), var(--paper); }
.auth-card { width: min(460px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 28px; background: rgba(255,254,250,.94); box-shadow: var(--shadow); }
.auth-card h1 { margin: 4px 0 10px; font: 700 40px/1.08 "Inter", sans-serif; letter-spacing: -.04em; }
.auth-card .notice { margin: 20px 0; }
.stack-form { display: grid; gap: 16px; margin-top: 25px; }
.stack-form .button { margin-top: 5px; }
.auth-secondary-action { margin: 18px 0 0; text-align: center; }

.user-create-form { grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) minmax(180px, 1fr) auto; }
.user-help { margin: 14px 0 0; }
.user-list { display: grid; gap: 12px; margin-top: 22px; }
.user-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; }
.user-card.is-inactive { opacity: .7; }
.user-card h2 { margin-bottom: 9px; }
.user-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.user-badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #57544d; background: #ece9e1; font-size: 10px; font-weight: 800; }
.user-badge--active { color: #315b36; background: #e5f3e8; }
.user-badge--inactive { color: #812f27; background: #f8e5e2; }
.user-badge--warning { color: #745615; background: #fff1c8; }
.user-meta { margin: 10px 0 0; font-size: 11px; }
.user-self-note { margin: 0; font-size: 12px; }
.user-card__actions { display: flex; align-items: center; justify-content: flex-end; gap: 15px; }
.user-card__actions form { margin: 0; }
.password-reset { position: relative; }
.password-reset summary { color: var(--muted); font-size: 12px; font-weight: 550; cursor: pointer; }
.inline-password-form { position: absolute; z-index: 5; top: calc(100% + 10px); right: 0; display: grid; width: min(430px, 80vw); padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: var(--shadow); gap: 12px; }
.inline-password-form label { display: grid; gap: 6px; color: #53514b; font-size: 11px; font-weight: 550; }
.inline-password-form input { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.account-password-card { max-width: 650px; }
.account-password-form { max-width: 460px; }
.account-lists-card { max-width: 100%; margin-bottom: 22px; }
.list-create-form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: end; gap: 12px; margin: 22px 0; }
.app-modal .list-create-form { grid-template-columns: 1fr; margin-bottom: 0; }
.list-create-form label { display: grid; gap: 7px; color: #53514b; font-size: 12px; font-weight: 550; }
.list-create-form input, .list-rename-form input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.account-list-settings { display: grid; gap: 8px; }
.account-list-row { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto auto; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.account-list-row--system { grid-template-columns: auto minmax(0, 1fr) auto; margin-top: 8px; background: #f6f3ec; }
.account-list-row--system small { display: block; margin-top: 3px; color: var(--muted); }
.account-list-lock { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--paper); background: var(--ink); }
.list-rename-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.list-rename-form label { min-width: 0; }
.list-drag-handle { display: grid; place-items: center; width: 34px; height: 40px; padding: 0; border: 0; border-radius: 9px; color: #858178; background: transparent; font-size: 22px; cursor: grab; touch-action: none; }
.list-drag-handle:hover, .list-drag-handle:focus-visible { color: var(--ink); background: #eeebe4; }
.account-list-row.is-dragging { opacity: .6; box-shadow: var(--shadow); }
.list-sort-help { margin: 19px 0 9px; color: var(--muted); font-size: 11px; }
.list-sort-help [data-list-sort-status] { color: #397145; font-weight: 550; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 26px max(var(--layout-gutter), calc((100vw - var(--layout-max)) / 2 + var(--layout-gutter))); border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

@media (max-width: 1200px) {
    .feed-settings-item {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "head actions"
            "meta actions"
            "form form"
            "error error";
        row-gap: 10px;
    }
    .compact-form { grid-template-columns: minmax(180px, 1fr) 72px minmax(200px, 1fr) auto; }
    .user-create-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .user-create-form .button { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 1050px) {
    .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-header { grid-template-columns: auto 1fr auto; gap: 14px; }
}

@media (max-width: 768px) {
    .compact-form { grid-template-columns: minmax(0, 1fr) 82px; }
    .compact-form .feed-thumbnail-field { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    :root { --layout-gutter: 20px; }
    .site-header { grid-template-columns: 1fr auto; min-height: 66px; padding-block: 10px; }
    .site-header .search { grid-column: 1 / -1; grid-row: 2; }
    .brand { font-size: 18px; }
    .brand > span { width: 34px; height: 34px; }
    .page-notice { width: calc(100% - 40px); }
    .feed-health-alert__head { align-items: flex-start; flex-direction: column; gap: 7px; }
    .feed-strip-wrap { padding-top: 12px; }
    .feed-strip { margin-inline: -20px; padding-inline: 20px; }
    .view-nav { align-items: flex-start; flex-direction: column; }
    .view-tabs { width: 100%; margin-right: 0; padding-right: 0; }
    .view-actions { width: 100%; justify-content: space-between; }
    .item-grid { grid-template-columns: 1fr; gap: 16px; }
    .item-card {
        display: grid;
        grid-template-columns: minmax(145px, 44%) minmax(0, 1fr);
        grid-template-areas:
            "image meta"
            "image title"
            "image footer"
            "summary summary";
        grid-template-rows: auto auto 1fr auto;
        align-items: stretch;
        border-radius: 16px;
    }
    .card-image { grid-area: image; height: 100%; min-height: 230px; aspect-ratio: auto; }
    .card-body { display: contents; }
    .item-card h2 { grid-area: title; align-self: start; margin: 0; padding: 0 14px; font-size: 17px; }
    .card-summary {
        display: block;
        grid-area: summary;
        margin: 0;
        padding: 15px 16px 18px;
        border-top: 1px solid #ebe8e1;
        color: #55534d;
        font-size: 13px;
        line-height: 1.55;
        overflow: visible;
        -webkit-line-clamp: initial;
    }
    .card-meta { grid-area: meta; align-items: flex-start; flex-direction: column; gap: 6px; margin: 0; padding: 14px 14px 10px; }
    .feed-label { max-width: 100%; }
    .card-footer { grid-area: footer; align-items: flex-end; justify-content: flex-end; margin: 0; padding: 12px 14px 14px; border-top: 0; }
    .card-actions { justify-content: flex-end; }
    .state-button span { display: none; }
    .state-button { min-width: 34px; justify-content: center; font-size: 15px; }
    .author { display: none; }
    .media-label { left: 7px; right: 7px; bottom: 7px; padding: 5px 6px; font-size: 9px; text-align: center; }
    .settings-layout { padding-top: 30px; }
    .section-title-row { gap: 12px; }
    .settings-intro__action { margin-bottom: 0; }
    .section-title-row--card { margin-bottom: 14px; }
    .settings-card { padding: 18px; }
    .settings-form { grid-template-columns: 1fr 90px; }
    .feed-settings-head a { max-width: 55vw; }
    .feed-settings-item {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "head"
            "meta"
            "form"
            "actions"
            "error";
        padding: 13px;
    }
    .feed-settings-item > .inline-actions { grid-area: actions; align-items: flex-start; flex-direction: row; }
    .microcopy { margin-left: 0; }
    .compact-form { grid-template-columns: minmax(0, 1fr) 88px; }
    .compact-form .feed-thumbnail-field { grid-column: 1; min-width: 0; }
    .compact-form .button { grid-column: 2; }
    .auth-page { padding: 20px; }
    .auth-card { padding: 27px; }
    .list-create-form { grid-template-columns: 1fr; }
    .account-list-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .account-list-row > .user-badge { display: none; }
    .account-list-row > form:last-child { grid-column: 2 / -1; }
    .user-create-form { grid-template-columns: 1fr; }
    .user-create-form .button { grid-column: auto; justify-self: stretch; }
    .user-card { grid-template-columns: 1fr; gap: 17px; }
    .user-card__actions { align-items: flex-start; flex-direction: column; }
    .inline-password-form { position: static; width: 100%; margin-top: 10px; box-shadow: none; }
    .site-footer { align-items: flex-start; flex-direction: column; padding-block: 22px; }
}

@media (max-width: 430px) {
    .app-modal { padding: 20px; border-radius: 18px; }
    .app-modal__form > .button { width: 100%; justify-self: stretch; }
    .item-card { grid-template-columns: minmax(132px, 45%) minmax(0, 1fr); }
    .settings-form { grid-template-columns: 1fr; }
    .compact-form { grid-template-columns: minmax(0, 1fr) 72px; }
    .compact-form .feed-thumbnail-field { grid-column: 1; }
    .compact-form .button { grid-column: 2; padding-inline: 8px; }
    .span-2 { grid-column: auto; }
}
