:root {
  color-scheme: light;
  --ink: #111418;
  --muted: #5e6874;
  --line: #c8ced6;
  --paper: #fbfaf7;
  --panel: #eef2f6;
  --blue: #102a43;
  --red: #027F2D;
  --gold: #c29340;
  --shadow: 0 24px 70px rgba(17, 20, 24, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #dfe5ec;
  color: var(--ink);
  font-family: "Source Sans 3", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
}

.creator {
  align-self: start;
  position: sticky;
  top: 24px;
}

.brand-strip,
.control-panel {
  background: #ffffff;
  border: 1px solid rgba(17, 20, 24, 0.08);
  box-shadow: 0 14px 34px rgba(17, 20, 24, 0.08);
}

.brand-strip {
  padding: 22px 24px 18px;
  border-bottom: 4px solid var(--blue);
}

.kicker,
.edition,
.section-label {
  margin: 0;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-strip h1 {
  margin: 4px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  line-height: 0.95;
}

.control-panel {
  display: grid;
  gap: 18px;
  margin-top: 14px;
  padding: 20px;
}

.file-drop {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px dashed #8c98a6;
  background: var(--panel);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop__title {
  font-weight: 800;
  color: var(--blue);
}

.file-drop__hint {
  color: var(--muted);
}

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

.field-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.field-grid span {
  font-size: 0.85rem;
  font-weight: 800;
}

.field-grid input,
.field-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #b7c0ca;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
}

.span-2 {
  grid-column: span 2;
}

.tone-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tone-buttons button,
.secondary {
  border: 1px solid #9ca8b5;
  background: #f7f9fb;
  color: var(--blue);
  min-height: 42px;
  padding: 8px 10px;
  font-weight: 800;
}

.tone-buttons button.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

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

.primary {
  min-height: 48px;
  border: 0;
  background: var(--red);
  color: white;
  padding: 10px 14px;
  font-weight: 900;
}

.status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.paper-wrap {
  display: grid;
  place-items: start center;
  overflow: auto;
}

.newspaper {
  width: min(100%, 980px);
  background: var(--paper);
  border: 1px solid #bec5cd;
  box-shadow: var(--shadow);
  padding: clamp(18px, 3.2vw, 34px);
  font-family: Merriweather, Georgia, serif;
}

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  border-bottom: 4px double var(--ink);
  padding-bottom: 12px;
}

.masthead h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 9vw, 6.8rem);
  line-height: 0.85;
}

.meta {
  display: grid;
  gap: 4px;
  min-width: 160px;
  text-align: right;
  font-family: "Source Sans 3", Arial, sans-serif;
  color: var(--muted);
}

.meta strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.headline-block {
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--line);
}

.headline-block h3 {
  max-width: 900px;
  margin: 4px 0 8px;
  font-size: clamp(2.1rem, 5.5vw, 5rem);
  line-height: 0.96;
}

.headline-block p:last-child {
  max-width: 780px;
  margin: 0;
  color: #353b43;
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 700;
}

.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 22px;
  margin-top: 20px;
}

.photo-frame {
  margin: 0;
}

.photo-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background:
    linear-gradient(135deg, rgba(16, 42, 67, 0.12), rgba(143, 45, 43, 0.12)),
    #e8edf2;
  border: 1px solid var(--line);
}

.photo-frame img:not([src]) {
  min-height: 340px;
}

.photo-frame figcaption {
  padding-top: 7px;
  color: var(--muted);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 0.9rem;
}

.article-copy {
  column-count: 1;
  font-size: 1rem;
  line-height: 1.72;
}

.article-copy p {
  margin: 0;
  white-space: pre-line;
}

blockquote {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-left: 6px solid var(--gold);
  background: #f1eee6;
  font-size: 1.22rem;
  font-weight: 900;
  line-height: 1.35;
}

.paper-side {
  display: grid;
  grid-template-columns: 0.9fr 1fr 1fr;
  gap: 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 3px solid var(--ink);
}

.paper-side section {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.paper-side h4 {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 1.05rem;
  line-height: 1.15;
}

.paper-side p,
.ticker li {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.ticker ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

@media (min-width: 1180px) {
  .article-copy {
    column-count: 2;
    column-gap: 22px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
    padding: 14px;
  }

  .creator {
    position: static;
    margin-bottom: 18px;
  }

  .lead-grid,
  .paper-side {
    grid-template-columns: 1fr;
  }

  .masthead {
    align-items: start;
  }
}

@media (max-width: 560px) {
  .field-grid,
  .tone-buttons,
  .actions {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .newspaper {
    padding: 16px;
  }

  .masthead {
    display: grid;
  }

  .meta {
    min-width: 0;
    text-align: left;
  }

  .photo-frame img:not([src]) {
    min-height: 230px;
  }
}
