:root {
  color-scheme: light;
  --ink: #000000;
  --muted: #000000;
  --line: #000000;
  --paper: #ffffff;
  --surface: #ffffff;
  --accent: #22c55e;
  --neutral: #e5e7eb;
  --danger: #000000;
  --radius: 0;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
a:hover { background: var(--accent); color: var(--ink); }
img { max-width: 100%; display: block; }
button, .button {
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--accent);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  min-height: 2.5rem;
  padding: 0 .9rem;
  text-transform: uppercase;
  font-weight: 900;
}
button:hover, .button:hover { transform: translate(1px, 1px); box-shadow: 3px 3px 0 var(--ink); }
button.secondary, .button.secondary { background: var(--neutral); color: var(--ink); }
button.danger { background: var(--ink); color: var(--surface); }
button.icon-button {
  min-height: 2rem;
  padding: 0 .45rem;
}
button:disabled { background: var(--neutral); cursor: not-allowed; }
input, textarea, select {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  padding: .72rem .8rem;
}
input:focus, textarea:focus, select:focus {
  outline: 3px solid var(--accent);
  outline-offset: 0;
}
textarea { resize: vertical; }
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px max(16px, calc((100vw - 1180px) / 2));
  background: var(--surface);
  border-bottom: 3px solid var(--line);
}
.brand {
  background: var(--ink);
  color: var(--surface);
  font-weight: 950;
  font-size: 1.25rem;
  padding: .35rem .5rem;
  text-transform: uppercase;
}
.search input { min-height: 2.4rem; }
.account-nav, .feed-tabs, .row-actions, .button-row, .engagement {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.account-nav a, .feed-tabs a { color: var(--ink); font-weight: 850; text-transform: uppercase; }
.feed-tabs {
  padding: 10px max(16px, calc((100vw - 1180px) / 2));
  border-bottom: 3px solid var(--line);
  background: var(--surface);
}
.feed-tabs a {
  border: 2px solid transparent;
  padding: .25rem .45rem;
}
.feed-tabs .active { background: var(--accent); border-color: var(--ink); color: var(--ink); }
.page-heading, .profile-header, .editor-shell, .settings-panel, .login-panel, .static-page {
  margin-bottom: 28px;
}
.page-heading h1, .reader h1, .profile-header h1, .editor-shell h1, .settings-panel h1, .login-panel h1 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}
.page-heading p, .muted, .meta { color: var(--ink); }
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.content-card {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cover {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  background: var(--neutral);
  color: var(--accent);
  font-weight: 800;
  border-bottom: 3px solid var(--ink);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 85%;
  overflow: hidden;
  padding: 12px;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.45);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.card-body { padding: 14px; flex: 1; }
.card-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.content-card h2 {
  margin: 10px 0 6px;
  font-size: 1.15rem;
  line-height: 1.2;
  min-height: 2.8rem;
}
.content-card p {
  display: -webkit-box;
  min-height: 3rem;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.author { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.author img, .avatar-lg { border: 2px solid var(--ink); border-radius: 50%; background: var(--neutral); }
.author img { width: 24px; height: 24px; }
.avatar-lg { width: 96px; height: 96px; }
.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--neutral);
  border: 2px solid var(--ink);
}
.meta, .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: .9rem; }
.tags a { background: var(--neutral); border: 1px solid var(--ink); color: var(--ink); font-weight: 800; padding: .05rem .25rem; }
.ai-disclosure {
  border: 2px solid var(--ink);
  background: var(--neutral);
  margin-top: 14px;
  padding: 10px 12px;
}
.ai-disclosure p { margin: 0; }
.ai-disclosure p + p { margin-top: 6px; }
.audio-player-panel {
  border: 3px solid var(--ink);
  background: var(--surface);
  box-shadow: 6px 6px 0 var(--ink);
  display: grid;
  gap: 12px;
  margin: 0 0 28px;
  padding: 14px;
}
.audio-player-panel h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  text-transform: uppercase;
}
.audio-player-panel p { margin: 0; }
.audio-player-panel audio,
.audio-editor-preview audio {
  width: 100%;
}
.audio-editor-preview {
  border: 3px solid var(--ink);
  display: grid;
  gap: 10px;
  padding: 12px;
}
.audio-upload-panel {
  border: 3px solid var(--ink);
  display: grid;
  gap: 10px;
  padding: 12px;
}
.upload-progress {
  display: grid;
  gap: 6px;
}
.upload-progress[hidden] { display: none; }
.upload-progress-bar {
  height: 18px;
  border: 2px solid var(--ink);
  background: var(--neutral);
  overflow: hidden;
}
.upload-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}
.upload-progress p {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 0;
  font-weight: 900;
  text-transform: uppercase;
}
.upload-progress.is-processing p::before {
  animation: spin .8s linear infinite;
  border: 3px solid var(--ink);
  border-top-color: var(--accent);
  border-radius: 50%;
  content: "";
  display: inline-block;
  height: 18px;
  width: 18px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.focus-audio-player {
  box-shadow: none;
  margin: 18px 0 0;
}
.badge {
  border: 2px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  display: inline-flex;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
  padding: .35rem .5rem;
}
.rating-g { background: var(--accent); }
.rating-pg13 { background: var(--neutral); }
.rating-r { background: var(--surface); }
.rating-nsfw { background: var(--ink); color: var(--surface); }
.stars { color: var(--ink); letter-spacing: 0; }
.reader {
  max-width: 860px;
  margin: 0 auto;
}
.reader-cover {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 3px solid var(--ink);
  margin-bottom: 24px;
}
.reader-header { border-bottom: 3px solid var(--line); padding-bottom: 20px; margin-bottom: 28px; }
.reader-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.utility-link {
  border-bottom: 2px solid var(--ink);
  font-size: .8rem;
  font-weight: 900;
  text-transform: uppercase;
}
.subtitle { font-size: 1.25rem; color: var(--ink); }
.prose {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--ink);
  padding: clamp(20px, 4vw, 42px);
  font-size: 1.08rem;
}
.prose h1, .prose h2, .prose h3 { line-height: 1.15; }
.prose blockquote { border-left: 8px solid var(--accent); margin-left: 0; padding-left: 1rem; color: var(--ink); }
.engagement, .report, .comments { margin-top: 24px; }
.inline-form { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.inline-form select { width: auto; }
.comment, .list-row {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.text-link {
  border-bottom: 2px solid var(--ink);
  font-weight: 900;
}
.comment-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 900;
}
.comment-author img,
.comment-author span {
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--neutral);
  object-fit: cover;
}
.comment-author span {
  display: inline-grid;
  place-items: center;
}
.comment-form, .stack-form { display: grid; gap: 12px; }
.profile-header { display: flex; gap: 18px; align-items: center; }
.table-list, .admin-grid {
  display: grid;
  gap: 14px;
}
.admin-grid { grid-template-columns: 1fr 1fr; }
.dashboard-section, .admin-panel {
  margin-bottom: 28px;
}
.dashboard-section h2, .admin-panel h2 {
  margin: 0 0 10px;
  text-transform: uppercase;
}
.analytics-panel {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.metric-card {
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  padding: 12px;
}
.metric-card span {
  display: block;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}
.metric-card strong {
  display: block;
  font-size: 1.8rem;
  line-height: 1.1;
}
.compact-list .list-row {
  margin-bottom: 0;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.list-row h2, .list-row h3 { margin: 0 0 4px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.checkbox-label input {
  width: auto;
}
.editor-form, .body-editor { display: grid; gap: 16px; }
.body-editor { margin-top: 16px; }
.provider-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.dev-login { margin-top: 18px; }
.notice {
  border-radius: var(--radius);
  margin: 12px 0;
  padding: 12px 14px;
}
.notice.error {
  background: var(--accent);
  border: 3px solid var(--ink);
  color: var(--ink);
}
.human-check {
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding: 14px;
}
.human-check h2 {
  font-size: 1rem;
  margin: 0;
}
.human-check p { margin: 0; }
.empty {
  background: var(--surface);
  border: 3px dashed var(--line);
  border-radius: var(--radius);
  padding: 42px;
  text-align: center;
}
.site-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 28px 16px;
  border-top: 3px solid var(--line);
  color: var(--ink);
}
.cookie-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  width: min(680px, calc(100% - 32px));
  background: var(--surface);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  padding: 14px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  text-transform: uppercase;
}
.cookie-banner p { margin: 0; }
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.site-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .42);
}
.site-popup-backdrop[hidden] { display: none; }
.site-popup {
  position: relative;
  width: min(560px, 100%);
  background: var(--surface);
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  padding: 22px;
}
.site-popup.has-image {
  display: flex;
  align-items: end;
  min-height: min(680px, calc(100vh - 56px));
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.site-popup-content {
  width: 100%;
}
.site-popup.has-image .site-popup-content {
  background: var(--surface);
  border: 3px solid var(--ink);
  padding: 14px;
}
.site-popup.has-image .site-popup-content:empty {
  display: none;
}
.site-popup h2 {
  margin: 0 40px 10px 0;
  font-size: clamp(1.6rem, 5vw, 2.7rem);
  line-height: 1;
  text-transform: uppercase;
}
.site-popup p {
  margin: 0 0 16px;
}
.site-popup-close {
  position: absolute;
  right: 12px;
  top: 12px;
}
.user-table {
  border: 3px solid var(--ink);
}
.user-table-head,
.user-table-row {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
}
.user-table-head {
  background: var(--ink);
  color: var(--surface);
  font-weight: 900;
  text-transform: uppercase;
}
.user-table-row + .user-table-row {
  border-top: 2px solid var(--ink);
}
.admin-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.admin-user img,
.admin-user > span {
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--neutral);
  flex: 0 0 auto;
  object-fit: cover;
}
.admin-user > span {
  display: inline-grid;
  place-items: center;
  font-weight: 900;
}
.admin-user small {
  overflow-wrap: anywhere;
}
.popup-preview {
  align-items: start;
  display: grid;
  gap: 10px;
}
.popup-preview img {
  width: min(320px, 100%);
  border: 3px solid var(--ink);
}

.focus-mode {
  background: var(--surface);
}
.focus-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 6px 10px;
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
}
.focus-author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 900;
  text-transform: uppercase;
}
.focus-author img,
.focus-avatar-fallback {
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--neutral);
  object-fit: cover;
}
.focus-avatar-fallback {
  display: inline-grid;
  place-items: center;
}
.focus-exit {
  border: 2px solid var(--ink);
  background: var(--neutral);
  font-size: .78rem;
  font-weight: 900;
  padding: .15rem .4rem;
  text-transform: uppercase;
}
.focus-reader {
  width: min(780px, calc(100% - 28px));
  padding: 28px 0 64px;
}
.focus-cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border: 3px solid var(--ink);
  margin-bottom: 28px;
}
.focus-content h1 {
  margin: 0 0 10px;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: .98;
}
.focus-ai-note {
  border-left: 8px solid var(--accent);
  font-weight: 900;
  margin: 14px 0 0;
  padding-left: 10px;
}
.focus-prose {
  border: 0;
  box-shadow: none;
  padding: 24px 0 0;
  font-size: 1.16rem;
}

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr; }
  .cookie-banner { grid-template-columns: 1fr; }
  .account-nav { justify-content: flex-start; }
  .row-between, .profile-header, .list-row { align-items: flex-start; flex-direction: column; }
  .form-grid, .admin-grid { grid-template-columns: 1fr; }
  .analytics-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-table-head { display: none; }
  .user-table-row { grid-template-columns: 1fr; }
  .page-heading h1, .reader h1, .profile-header h1, .editor-shell h1, .settings-panel h1, .login-panel h1 { font-size: 2rem; }
}
