:root {
  --bg: #000;
  --panel: #111;
  --panel-2: #18181b;
  --yellow: #eab308;
  --yellow-2: #facc15;
  --red: #b91c1c;
  --white: #fff;
  --muted: #d4d4d8;
  --line: #3f3f46;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--white);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0a0a;
  color: var(--white);
  padding: 10px 12px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

button,
.primary-btn,
.ghost-btn,
.small-btn,
.danger-btn {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 900;
}

.primary-btn {
  background: var(--yellow);
  color: #000;
}

.ghost-btn,
.small-btn {
  background: #27272a;
  color: var(--white);
}

.danger-btn {
  background: var(--red);
  color: var(--white);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(440px, 100%);
  border: 1px solid var(--yellow);
  border-radius: 12px;
  background: var(--panel);
  padding: 30px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: .95;
}

.auth-card p {
  color: var(--muted);
  margin: 0 0 22px;
}

.auth-card form {
  display: grid;
  gap: 16px;
}

.alert {
  background: var(--red);
  color: var(--white);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  font-weight: 800;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 22px;
  background: rgba(0, 0, 0, .92);
  border-bottom: 1px solid #27272a;
  backdrop-filter: blur(8px);
}

.app-header div,
.app-header nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-header span {
  color: var(--muted);
  font-size: 13px;
}

.dashboard {
  width: min(1120px, calc(100% - 32px));
  margin: 30px auto;
}

.dashboard-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-title h1 {
  margin: 0;
}

.table-card {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid #27272a;
  text-align: left;
}

th {
  color: var(--yellow);
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.actions form {
  margin: 0;
}

.empty-state {
  color: var(--muted);
  padding: 26px;
}

.setup-warning {
  display: grid;
  gap: 10px;
  padding: 24px;
}

.setup-warning strong,
.success-line {
  color: var(--yellow);
  font-weight: 900;
}

.setup-warning p,
.install-note {
  color: var(--muted);
  margin: 0;
}

.success-line {
  border: 1px solid #365314;
  border-radius: 8px;
  background: #13210a;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.editor-shell {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 22px;
}

.editor-panel {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 108px);
  overflow: auto;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 14px;
}

.panel-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.panel-actions .primary-btn {
  grid-column: 1 / -1;
}

details {
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 10px;
  background: #0a0a0a;
}

summary {
  cursor: pointer;
  color: var(--yellow);
  font-weight: 900;
}

details[open] {
  display: grid;
  gap: 12px;
}

details[open] summary {
  margin-bottom: 12px;
}

.three-cols,
.control-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

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

.control-grid label:last-child {
  grid-column: 1 / -1;
}

.paper-stage {
  overflow: auto;
  padding-bottom: 30px;
}

.newspaper {
  width: min(100%, 960px);
  min-width: 720px;
  margin: 0 auto;
  border: 4px solid #27272a;
  border-radius: 12px;
  background: #030303;
  color: var(--white);
  padding: 16px 18px 18px;
}

.paper-top {
  display: grid;
  grid-template-columns: 92px 1fr 150px;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid #27272a;
  padding-bottom: 14px;
}

.masthead h1 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .88;
  letter-spacing: 0;
}

.masthead p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
  letter-spacing: 3px;
}

.edition-meta {
  display: grid;
  gap: 4px;
  text-align: right;
  font-size: 15px;
}

.lead-grid {
  display: grid;
  grid-template-columns: 4fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.hero-section {
  position: relative;
  height: 520px;
  overflow: hidden;
  border: 1px solid var(--yellow);
  border-radius: 12px;
  background: linear-gradient(135deg, #121216 0%, #070707 62%);
  padding: 24px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 48%;
}

.badge {
  display: inline-block;
  background: #dc0000;
  color: #fff;
  border-radius: 4px;
  padding: 9px 12px;
  font-size: 15px;
  font-weight: 1000;
}

.hero-copy h2 {
  margin: 14px 0 16px;
  font-size: var(--headline-size, 46px);
  line-height: .95;
}

.hero-copy h3,
.news-block h3 {
  margin: 0 0 12px;
  color: #ffd400;
  font-size: var(--main-title-size, 30px);
  line-height: 1.1;
  font-weight: 1000;
}

.news-block h3 {
  font-size: 30px;
}

.hero-copy p,
.news-block p,
.side-card p,
.paper-footer p {
  margin: 0;
  color: #f4f4f5;
  font-size: 18px;
  line-height: 1.42;
}

.main-image-box {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--yellow);
  background: #15151a;
  z-index: 1;
  display: grid;
  place-items: center;
}

.main-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
  will-change: transform, object-position;
}

.main-image-box span,
.media-slot span {
  color: #71717a;
  font-weight: 900;
}

.main-image-box.vertical {
  position: absolute;
  right: 20px;
  top: 20px;
  bottom: 20px;
  width: 50%;
}

.main-image-box.horizontal {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  height: 38%;
}

.hero-section:has(.main-image-box.horizontal) .hero-copy {
  max-width: calc(100% - 18px);
}

.hero-section:has(.main-image-box.horizontal) .hero-copy p {
  max-width: 88%;
}

.side-card {
  border: 1px solid var(--yellow);
  border-radius: 12px;
  padding: 12px;
  background: #070707;
}

.side-card h3 {
  color: #ffd400;
  font-size: 18px;
  line-height: 1.12;
  margin: 14px 0 8px;
  font-weight: 1000;
}

.side-card p {
  font-size: 13px;
}

.stripe-title {
  margin: 16px 6px 14px;
  border-radius: 5px;
  background: linear-gradient(180deg, #f8c400, #eab308);
  color: #000;
  padding: 14px 18px;
  text-align: center;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 1000;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.news-block {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  min-height: 230px;
  border: 1px solid var(--yellow);
  border-radius: 10px;
  padding: 14px;
  background: #050505;
}

.media-slot {
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  background: #18181b;
}

.media-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.top-logo {
  width: 72px;
  height: 72px;
}

.side-image {
  height: 250px;
}

.column-image {
  min-height: 200px;
}

.paper-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.paper-footer article {
  border: 1px solid var(--yellow);
  border-radius: 8px;
  background: #050505;
  padding: 10px;
}

.footer-image {
  height: 96px;
  margin-bottom: 10px;
}

.paper-footer h4 {
  color: #ffd400;
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.15;
}

.paper-footer p {
  font-size: 12px;
}

@media (max-width: 1100px) {
  .editor-shell {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-shell {
    padding: 12px;
  }

  .three-cols,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .newspaper {
    min-width: 680px;
  }
}
