/*
  Ruolo del file:
  Foglio di stile principale dell'intero progetto pubblico e amministrativo.

  Come funziona:
  - definisce palette, spaziature, tipografia e componenti condivisi
  - gestisce sia il frontend pubblico sia il backend admin
  - contiene le regole responsive per card, menu, form e pannelli editoriali
*/
:root {
  --bg: #f7f2ea;
  --bg-soft: #fffaf6;
  --panel: rgba(255, 250, 246, 0.9);
  --line: rgba(85, 70, 60, 0.14);
  --text: #2a2421;
  --text-soft: #665d58;
  --peach: #ffd8c8;
  --mint: #d8f0e2;
  --sky: #dbeaf6;
  --rose: #f6d7dd;
  --warning: #fff0c7;
  --danger: #b04f4f;
  --shadow: 0 18px 40px rgba(72, 46, 32, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 216, 200, 0.75), transparent 28%),
    radial-gradient(circle at top right, rgba(216, 240, 226, 0.7), transparent 30%),
    linear-gradient(180deg, #fffaf6 0%, #f7f2ea 100%);
  font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.has-open-menu {
  overflow: hidden;
}

.site-menu {
  position: sticky;
  top: 0.8rem;
  z-index: 30;
  margin-bottom: 1rem;
}

.site-menu__bar,
.site-menu__panel {
  backdrop-filter: blur(16px);
  background: rgba(255, 250, 246, 0.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-menu__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 22px;
}

.site-menu__details {
  position: relative;
}

.site-menu__brand {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-menu__toggle {
  display: inline-grid;
  gap: 0.28rem;
  min-width: 54px;
  min-height: 54px;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(101, 86, 76, 0.14);
  background: rgba(255, 255, 255, 0.84);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.site-menu__toggle::-webkit-details-marker {
  display: none;
}

.site-menu__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.site-menu__panel {
  margin-top: 0.75rem;
  padding: 0.8rem;
  border-radius: 24px;
}

.site-menu__links {
  display: grid;
  gap: 0.65rem;
}

.site-menu__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(101, 86, 76, 0.12);
  text-decoration: none;
  color: var(--text);
}

.site-menu__link.is-current {
  background: var(--mint);
  border-color: rgba(63, 111, 84, 0.22);
  color: #2f5c44;
  font-weight: 700;
}

.narrow-shell {
  width: min(760px, calc(100% - 2rem));
}

.admin-shell {
  width: min(1320px, calc(100% - 2rem));
}

.narrow-panel {
  max-width: 760px;
}

.hero-panel,
.feature-panel,
.toolbar-panel,
.admin-panel,
.status-banner,
.empty-state {
  backdrop-filter: blur(16px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 1.5rem;
  padding: 2rem;
}

.feature-panel {
  display: grid;
  grid-template-columns: 1.6fr auto;
  gap: 1.25rem;
  align-items: center;
  margin-top: 1.4rem;
  padding: 1.35rem 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 200, 0.28), transparent 32%),
    linear-gradient(135deg, rgba(255, 250, 246, 0.96), rgba(255, 240, 199, 0.72));
}

.compact-panel {
  grid-template-columns: 1fr;
}

.hero-copy h1,
.feature-copy h2,
.results-header h2,
.admin-panel h2,
.empty-state h3 {
  margin: 0;
  font-family: "Fraunces", "Georgia", serif;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
}

.feature-copy h2,
.results-header h2,
.admin-panel h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.hero-text {
  max-width: 58ch;
  font-size: 1.08rem;
  color: var(--text-soft);
}

.eyebrow {
  margin: 0 0 0.8rem;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8b6656;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.hero-logo-panel {
  display: grid;
  place-items: center;
  padding: 1.2rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 200, 0.34), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 246, 0.88));
  border: 1px solid rgba(101, 86, 76, 0.12);
}

.hero-logo {
  width: min(100%, 320px);
  height: auto;
  object-fit: contain;
}

.feature-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.feature-button {
  min-width: 240px;
}

.hero-note,
.muted,
.support-text,
.author-line {
  color: var(--text-soft);
}

.special-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 216, 200, 0.92);
  border: 1px solid rgba(165, 93, 53, 0.14);
  color: #8b4f39;
  font-size: 0.92rem;
  font-weight: 800;
}

.primary-button,
.ghost-button,
.danger-button,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.chip:hover {
  transform: translateY(-1px);
}

.primary-button {
  color: #2f231d;
  background: linear-gradient(135deg, var(--peach), #ffe9db);
  border-color: rgba(165, 93, 53, 0.12);
  font-weight: 700;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
  color: var(--text);
}

.ghost-button.is-active {
  background: var(--mint);
}

.danger-button {
  background: rgba(176, 79, 79, 0.08);
  border-color: rgba(176, 79, 79, 0.2);
  color: var(--danger);
}

.toolbar-panel {
  margin-top: 1.4rem;
  padding: 1.25rem;
}

.ad-panel {
  display: grid;
  gap: 1rem;
  align-items: center;
  margin-top: 1.4rem;
  padding: 1.2rem 1.25rem;
  backdrop-filter: blur(16px);
  background:
    linear-gradient(135deg, rgba(255, 250, 246, 0.96), rgba(219, 234, 246, 0.72));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.ad-panel__copy {
  display: grid;
  gap: 0.35rem;
}

.ad-panel__copy .eyebrow,
.ad-panel__copy .muted {
  margin: 0;
}

.ad-panel__slot {
  min-height: 120px;
  padding: 0.4rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(85, 70, 60, 0.18);
}

.ad-panel__slot .adsbygoogle {
  min-height: 90px;
}

.search-field {
  display: grid;
  gap: 0.5rem;
  font-weight: 700;
}

.search-field__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.search-field__row .primary-button {
  min-height: 54px;
  white-space: nowrap;
}

.search-field__actions {
  margin-top: 0.1rem;
}

.search-field input,
.page-size-field select,
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(101, 86, 76, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.form-grid textarea {
  resize: vertical;
}

.editorial-helper-panel {
  display: grid;
  gap: 0.9rem;
}

.editorial-helper-panel__header h3 {
  margin: 0.2rem 0 0;
}

.category-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.category-row {
  margin-top: 1rem;
}

@media (max-width: 720px) {
  .search-field__row {
    grid-template-columns: 1fr;
  }

  .search-field__row .primary-button {
    width: 100%;
  }
}

.chip {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
}

.chip.is-selected {
  background: var(--mint);
  border-color: rgba(63, 111, 84, 0.2);
}

.status-banner,
.empty-state {
  margin-top: 1.4rem;
  padding: 1rem 1.25rem;
}

.status-banner {
  background: linear-gradient(135deg, rgba(255, 240, 199, 0.84), rgba(255, 250, 246, 0.84));
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.7rem;
}

.results-controls {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.page-size-field {
  display: grid;
  gap: 0.45rem;
  min-width: 190px;
  font-weight: 700;
}

.pagination-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.2rem;
}

.pagination-button {
  min-height: 44px;
  padding: 0.75rem 1rem;
}

.pagination-button.is-current {
  background: var(--mint);
  border-color: rgba(63, 111, 84, 0.24);
  color: #2f5c44;
}

.pagination-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.post-grid,
.dashboard-grid {
  display: grid;
  gap: 1.3rem;
  margin-top: 1.3rem;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 1.2rem;
  padding: 1rem;
  background: rgba(255, 250, 246, 0.82);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  scroll-margin-top: 1.5rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.post-card.is-targeted {
  border-color: rgba(63, 111, 84, 0.32);
  background: rgba(248, 255, 251, 0.92);
  box-shadow: 0 20px 45px rgba(63, 111, 84, 0.12);
}

.post-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--sky), var(--rose));
}

.post-image.placeholder {
  display: grid;
  place-items: center;
  color: #5d6573;
  font-weight: 700;
}

.post-copy h3 {
  margin: 0.45rem 0 0.35rem;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.1;
  font-family: "Fraunces", "Georgia", serif;
}

.content-link {
  text-decoration: none;
}

.content-link:hover,
.listing-title a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.post-copy > p:last-of-type {
  margin-bottom: 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.post-views-public {
  margin: 0 0 0.7rem;
  color: #2f5c44;
  font-weight: 600;
}

.post-views-public strong {
  font-weight: 800;
}

.post-actions {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.share-row {
  gap: 0.6rem;
  align-items: center;
}

.share-button {
  width: 52px;
  min-width: 52px;
  height: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 16px;
  flex: 0 0 auto;
}

.share-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  pointer-events: none;
}

.share-actions {
  display: grid;
  gap: 0.55rem;
}

.share-feedback {
  margin: 0;
  min-height: 1.25rem;
  color: #2f5c44;
  font-size: 0.92rem;
  font-weight: 600;
}

.voice-button {
  background: rgba(216, 240, 226, 0.88);
  border-color: rgba(63, 111, 84, 0.2);
  color: #2f5c44;
}

.voice-button:hover {
  background: rgba(206, 234, 220, 0.96);
}

.voice-button.is-active {
  background: #2f5c44;
  border-color: #2f5c44;
  color: #fffaf6;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--sky);
  font-size: 0.95rem;
  font-weight: 700;
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Sezione admin:
   Queste regole definiscono il linguaggio visivo condiviso del backend dopo la divisione
   in pagine dedicate: menu, card statistiche, card azione e pannelli operativi. */
.admin-panel {
  padding: 1.5rem;
}

.admin-header-panel {
  grid-template-columns: minmax(0, 1.4fr) auto;
  align-items: start;
}

.admin-header-copy {
  display: grid;
  gap: 0.55rem;
}

.admin-header-copy .eyebrow,
.admin-header-copy h1,
.admin-header-copy .hero-text,
.admin-user-heading {
  margin: 0;
}

.admin-user-heading {
  font-family: "Fraunces", "Georgia", serif;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  line-height: 1.1;
}

.admin-user-subline {
  max-width: 48ch;
}

.admin-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
}

.admin-nav-panel {
  margin-top: 1rem;
}

.admin-nav-grid,
.admin-link-grid,
.admin-stat-grid {
  display: grid;
  gap: 1rem;
}

.admin-nav-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.admin-link-grid {
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-stat-grid {
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-nav-link,
.admin-link-card,
.admin-stat-card {
  border-radius: 22px;
  border: 1px solid rgba(101, 86, 76, 0.12);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 30px rgba(72, 46, 32, 0.05);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.admin-nav-link,
.admin-link-card {
  text-decoration: none;
  color: var(--text);
}

.admin-nav-link:hover,
.admin-link-card:hover,
.admin-stat-card:hover {
  transform: translateY(-1px);
  border-color: rgba(63, 111, 84, 0.22);
  box-shadow: 0 20px 38px rgba(72, 46, 32, 0.08);
}

.admin-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0.9rem 1rem;
  font-weight: 700;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 242, 0.9));
}

.admin-nav-link.is-current {
  background: var(--mint);
  border-color: rgba(63, 111, 84, 0.24);
  color: #2f5c44;
  box-shadow: 0 18px 34px rgba(63, 111, 84, 0.1);
}

.admin-link-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 200, 0.2), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 250, 246, 0.9));
}

.admin-link-card .list-title,
.admin-link-card .muted,
.admin-stat-card .eyebrow,
.admin-stat-card .muted,
.admin-stat-card .admin-stat-value {
  margin: 0;
}

.admin-stat-card {
  display: grid;
  gap: 0.4rem;
  padding: 1rem;
  background:
    radial-gradient(circle at top left, rgba(216, 240, 226, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 246, 0.9));
}

.admin-stat-value {
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 800;
  font-family: "Fraunces", "Georgia", serif;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.login-form {
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.form-grid label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
}

.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  min-width: 0;
  padding-right: 4rem;
}

.password-toggle-button {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: rgba(64, 53, 46, 0.72);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}

.password-toggle-button:hover {
  background: rgba(238, 244, 255, 0.8);
  color: var(--text);
}

.password-toggle-button:focus-visible {
  outline: 2px solid rgba(15, 95, 219, 0.38);
  outline-offset: 2px;
}

.password-toggle-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  pointer-events: none;
}

.full-span {
  grid-column: 1 / -1;
}

.stack-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.post-picker-panel {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.post-picker-field {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
}

.post-picker-field select {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(101, 86, 76, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.image-tool-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(101, 86, 76, 0.12);
}

.image-tool-panel__header {
  display: grid;
  gap: 0.35rem;
}

.image-tool-panel__header h3,
.image-tool-panel__header .support-text {
  margin: 0;
}

.editor-image-preview {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(101, 86, 76, 0.12);
}

.editor-image-preview__media {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--sky), var(--rose));
}

.editor-image-preview__copy {
  display: grid;
  gap: 0.35rem;
}

.editor-image-preview__copy .list-title,
.editor-image-preview__copy .muted {
  margin: 0;
}

.post-detail-card {
  align-items: start;
}

.mfa-panel-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
  align-items: center;
}

.mfa-qr-card {
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(101, 86, 76, 0.12);
}

.mfa-qr-image {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
}

.mfa-copy {
  display: grid;
  gap: 0.75rem;
}

.mfa-step {
  margin: 0;
  color: var(--text-soft);
}

.mfa-secret {
  display: block;
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px dashed rgba(101, 86, 76, 0.24);
  color: var(--text);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.list-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(101, 86, 76, 0.12);
}

.list-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notice {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(219, 234, 246, 0.55);
  color: var(--text);
}

.console-toolbar {
  display: grid;
  gap: 1rem;
}

.console-stats,
.console-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.console-stat-card {
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}

.console-stat-card .eyebrow {
  margin-bottom: 0.35rem;
}

.console-stat-value {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 800;
  font-family: "Fraunces", "Georgia", serif;
}

.console-grid {
  align-items: start;
}

.console-panel {
  min-height: 100%;
}

.console-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.console-file-list {
  max-height: 780px;
  overflow: auto;
  padding-right: 0.25rem;
}

.console-file-card {
  display: grid;
  justify-items: start;
  gap: 0.45rem;
  width: 100%;
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(101, 86, 76, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.console-file-card:hover {
  transform: translateY(-1px);
}

.console-file-card.is-selected {
  background: rgba(216, 240, 226, 0.78);
  border-color: rgba(63, 111, 84, 0.28);
}

.console-section {
  margin-top: 1.25rem;
}

.console-section h3 {
  margin: 0 0 0.75rem;
  font-family: "Fraunces", "Georgia", serif;
  font-size: 1.2rem;
}

.console-link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.console-link-pill {
  min-height: 40px;
}

.console-flow-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.console-graph {
  width: 100%;
  min-height: 460px;
  margin-top: 1rem;
  border-radius: 26px;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 200, 0.28), transparent 24%),
    radial-gradient(circle at bottom right, rgba(216, 240, 226, 0.24), transparent 28%),
    rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.breadcrumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.breadcrumb-row a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.report-hero {
  align-items: start;
}

.report-subtitle {
  margin: 1rem 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #4e433d;
}

.report-intro-copy {
  display: grid;
  gap: 0.9rem;
  margin-top: 1rem;
}

.report-intro-copy p,
.report-section-panel p {
  margin: 0;
}

.report-summary-panel {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(101, 86, 76, 0.12);
}

.report-highlight-grid,
.report-stat-grid,
.special-highlight-grid {
  display: grid;
  gap: 0.9rem;
}

.report-highlight-grid,
.special-highlight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-highlight-card,
.special-highlight-card,
.report-stat-card {
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(101, 86, 76, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.report-highlight-value,
.report-stat-value,
.special-highlight-value {
  margin: 0 0 0.3rem;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 800;
  font-family: "Fraunces", "Georgia", serif;
  line-height: 1;
}

.report-highlight-card p,
.special-highlight-card p,
.report-stat-card p {
  margin: 0;
}

.report-stack {
  display: grid;
  gap: 1.3rem;
  margin-top: 1.4rem;
}

.report-stack + .report-section-panel,
.report-section-panel + .report-section-panel {
  margin-top: 1.3rem;
}

.report-section-panel {
  display: grid;
  gap: 1.2rem;
}

.report-section-copy {
  display: grid;
  gap: 0.9rem;
}

.report-section-panel h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  line-height: 1.08;
  font-family: "Fraunces", "Georgia", serif;
}

.report-chart-shell {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(216, 240, 226, 0.24), transparent 26%),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(101, 86, 76, 0.12);
}

.report-chart-head {
  display: grid;
  gap: 0.35rem;
}

.report-chart-head h3 {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-family: "Fraunces", "Georgia", serif;
}

.report-bar-chart {
  padding: 1rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 250, 246, 0.92), rgba(247, 242, 234, 0.82));
  border: 1px solid rgba(101, 86, 76, 0.1);
}

.report-bar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  align-items: end;
  min-height: 280px;
}

.report-bar {
  display: grid;
  gap: 0.7rem;
  height: 100%;
}

.report-bar-value,
.report-bar-label {
  text-align: center;
}

.report-bar-value {
  font-weight: 800;
  color: #4e433d;
}

.report-bar-label {
  font-size: 0.94rem;
  color: var(--text-soft);
}

.report-bar-track {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 200px;
  padding: 0.5rem 0.75rem 0;
  border-radius: 18px 18px 14px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.32));
}

.report-bar-fill {
  width: min(88px, 100%);
  min-height: 18px;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, #2f5c44, #5d8a69);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.report-chart-note,
.report-key-message {
  padding: 0.95rem 1rem;
  border-radius: 18px;
}

.report-chart-note {
  margin: 0;
  background: rgba(219, 234, 246, 0.5);
  color: var(--text-soft);
}

.report-key-message {
  margin: 0;
  background: rgba(255, 240, 199, 0.62);
  color: #5d4b31;
  font-weight: 700;
}

.report-table-wrap {
  overflow-x: auto;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 320px;
}

.report-table caption {
  margin-bottom: 0.75rem;
  text-align: left;
  font-weight: 700;
  color: var(--text-soft);
}

.report-table th,
.report-table td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(101, 86, 76, 0.14);
  text-align: left;
}

.report-table thead th {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a6a61;
}

.report-table tbody th {
  color: var(--text);
}

.specials-grid {
  display: grid;
  gap: 1.3rem;
  margin-top: 1.3rem;
}

.special-card {
  display: grid;
  grid-template-columns: 1.8fr minmax(240px, 320px);
  gap: 1.2rem;
  padding: 1.2rem;
  border-radius: 26px;
  background: rgba(255, 250, 246, 0.84);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.special-card-copy {
  display: grid;
  gap: 0.9rem;
}

.special-card-copy h2 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.1;
  font-family: "Fraunces", "Georgia", serif;
}

.special-card-copy p {
  margin: 0;
}

.special-card-actions {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.site-footer {
  margin-top: 2rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  text-align: center;
}

.site-footer--nav {
  display: grid;
  gap: 0.9rem;
}

.footer-link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1rem;
}

.site-footer a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.legal-panel {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.legal-panel h2 {
  margin-top: 1rem;
}

.legal-panel h2:first-child {
  margin-top: 0;
}

.legal-panel p {
  margin: 0;
  color: var(--text-soft);
}

.legal-panel code {
  padding: 0.1rem 0.35rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.7);
}

.article-shell {
  display: grid;
  gap: 0;
}

.article-panel,
.article-body-panel,
.article-note-panel,
.article-share-panel {
  margin-top: 1.3rem;
}

.article-header {
  display: grid;
  gap: 0.75rem;
}

.article-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
  font-family: "Fraunces", "Georgia", serif;
}

.article-dek {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.06rem;
}

.article-cover-shell {
  margin: 0;
}

.article-cover {
  width: 100%;
  border-radius: 22px;
  max-height: 72vh;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
}

.article-cover-shell {
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(219, 234, 246, 0.48), rgba(246, 215, 221, 0.42));
  border: 1px solid rgba(101, 86, 76, 0.12);
}

.article-body-panel,
.article-note-panel,
.article-share-panel {
  display: grid;
  gap: 0.9rem;
}

.article-body {
  display: grid;
  gap: 1rem;
  color: var(--text);
}

.article-body p,
.article-body ul,
.article-body h2,
.article-body h3 {
  margin: 0;
}

.article-body h2,
.article-body h3 {
  font-family: "Fraunces", "Georgia", serif;
  line-height: 1.15;
}

.article-body h2 {
  font-size: clamp(1.45rem, 4vw, 1.95rem);
  margin-top: 0.4rem;
}

.article-body h3 {
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  margin-top: 0.2rem;
}

.article-body ul {
  padding-left: 1.3rem;
}

.article-body li + li {
  margin-top: 0.5rem;
}

.article-body a {
  word-break: break-word;
}

.article-index-grid .post-card {
  grid-template-columns: 1fr;
}

.article-share-feedback {
  margin: 0;
}

.listing-title {
  margin: 0.45rem 0 0.35rem;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.1;
  font-family: "Fraunces", "Georgia", serif;
}

.source-list {
  display: grid;
  gap: 0.85rem;
}

.source-item {
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid rgba(101, 86, 76, 0.12);
  background: rgba(255, 255, 255, 0.76);
}

.source-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}

.source-item p {
  margin: 0;
  color: var(--text-soft);
}

.source-item a {
  color: #2f5c44;
}

@media (max-width: 960px) {
  .hero-panel,
  .feature-panel,
  .dashboard-grid,
  .form-grid,
  .admin-header-panel,
  .post-card,
  .mfa-panel-grid,
  .editor-image-preview,
  .console-stats,
  .console-meta-grid,
  .special-card,
  .report-highlight-grid,
  .special-highlight-grid,
  .report-stat-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 13vw, 3.8rem);
  }

  .feature-actions {
    justify-content: start;
  }

  .admin-header-actions {
    justify-content: stretch;
  }

  .admin-header-actions > * {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 1rem;
  }

  .site-menu {
    top: 0.5rem;
    margin-bottom: 0.9rem;
  }

  .hero-panel,
  .feature-panel,
  .ad-panel,
  .toolbar-panel,
  .admin-panel,
  .status-banner,
  .empty-state,
  .post-card,
  .console-graph,
  .special-card {
    border-radius: 22px;
    padding: 1rem;
  }

  .list-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .results-controls {
    justify-items: stretch;
    width: 100%;
  }

  .page-size-field {
    min-width: 0;
  }

  .console-file-list {
    max-height: none;
  }

  .report-bar-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .report-bar-track {
    min-height: 140px;
  }
}
