/* Revolver News — app styles.
 *
 * Revolver's own brand: the site's red, near-black and sand, Barlow Semi
 * Condensed for headings and Barlow for text (the website's fonts). Mobile
 * first, 44px tap targets, safe-area insets — the same rules as the other
 * Worq apps. The .pv-* rules at the end copy the website's article styles so
 * the preview looks like the real page.
 */

:root {
  color-scheme: light;
  --red: #B43A44;
  --red-dk: #962F38;
  --ink: #141414;
  --black: #0B0B0B;
  --sand: #F5F1EA;
  --sand-2: #ECE5D8;
  --grey: #5F5F5F;
  --line: rgba(20, 20, 20, .12);
  --card: #ffffff;
  --page: #faf8f4;
  --good: #1d7a35;
  --good-bg: #e6f3e9;
  --warn: #8a5a00;
  --warn-bg: #fdf1d8;
  --info: #24548f;
  --info-bg: #e5eef9;
  --head: "Barlow Semi Condensed", "Barlow", Arial, sans-serif;
  --body: "Barlow", Arial, sans-serif;
  --r: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 16px/1.5 var(--body); color: var(--ink); background: var(--page); -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--red); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: var(--ink); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-height: 44px; }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-sub { font: 800 15px/1 var(--head); letter-spacing: .22em; text-transform: uppercase; color: var(--red); padding-top: 2px; }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a { color: #fff; text-decoration: none; font: 700 14px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; padding: 14px 10px; border-radius: 8px; }
.topnav a[aria-current="page"] { color: var(--red); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 0; background: var(--red); color: #fff; font: 700 15px/1 var(--head); cursor: pointer; margin-left: 6px; }
@media (max-width: 560px) {
  .brand-logo { height: 19px; }
  .brand-sub { font-size: 12px; letter-spacing: .16em; }
  .topnav a[data-nav="articles"] { display: none; }   /* the logo is the way back to the list */
  .topnav a { padding: 12px 6px; font-size: 13px; }
}

/* --------------------------------------------------------------------- page */
.page { max-width: 1080px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-left)) calc(96px + env(safe-area-inset-bottom)); outline: none; }
.loading { color: var(--grey); }
h1, h2, h3 { font-family: var(--head); text-transform: uppercase; line-height: 1.05; margin: 0; }
h1 { font-weight: 800; font-size: clamp(30px, 5vw, 44px); }
h2 { font-weight: 800; font-size: 24px; }
h3 { font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.eyebrow { font: 700 13px/1 var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--red); margin: 0 0 8px; }
.muted { color: var(--grey); }
.small { font-size: 14px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--red);
  background: var(--red); color: #fff; text-decoration: none; cursor: pointer;
  font: 700 14px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.btn:hover { background: var(--red-dk); border-color: var(--red-dk); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-dark:hover { background: #000; border-color: #000; }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-text { background: none; border: 0; color: var(--grey); text-decoration: underline; padding: 10px 8px; min-height: 44px; cursor: pointer; }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.icon-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; line-height: 1; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* -------------------------------------------------------------------- tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.tabs button { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; cursor: pointer; font: 700 13px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tabs .count { opacity: .65; margin-left: 4px; }

/* ----------------------------------------------------------------- list */
.list { display: grid; gap: 12px; }
.row {
  display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center;
  padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: inherit;
}
.row:hover { border-color: var(--ink); }
.thumb { width: 96px; aspect-ratio: 4 / 3; border-radius: 10px; background: var(--sand-2) center / cover no-repeat; }
.row h3 { font-size: 19px; margin: 4px 0 4px; }
.row .meta { font-size: 14px; color: var(--grey); }
@media (min-width: 640px) { .row { grid-template-columns: 140px 1fr; } .thumb { width: 140px; } }
.empty { padding: 40px 20px; text-align: center; background: var(--card); border: 1px dashed var(--line); border-radius: var(--r); }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 700 12px/1.2 var(--head); letter-spacing: .1em; text-transform: uppercase; background: var(--sand-2); color: var(--ink); }
.badge-published { background: var(--good-bg); color: var(--good); }
.badge-review { background: var(--info-bg); color: var(--info); }
.badge-changes, .badge-unpublished { background: var(--warn-bg); color: var(--warn); }
.badge-error { background: #fbe9ea; color: var(--red-dk); }
.badge-queued { background: #ede4fb; color: #4b2a87; }
.notice-queued { background: #f1eafc; color: #2f1a57; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.row .badge { padding: 3px 8px; font-size: 11px; }

/* ---------------------------------------------------------------- editor */
.editor-bar {
  position: sticky; top: 64px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: -8px -8px 18px; padding: 10px 8px; background: rgba(250, 248, 244, .96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.editor-bar .spacer { flex: 1; }
@media (max-width: 700px) { .editor-bar { position: static; margin-top: -12px; } }   /* on a phone it would cover a third of the screen */
.save-state { font-size: 14px; color: var(--grey); min-width: 70px; }
.editor { display: grid; gap: 18px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.panel > h2 { font-size: 18px; letter-spacing: .06em; margin-bottom: 12px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label, .label { font: 700 13px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; }
.hint { font-size: 14px; color: var(--grey); margin: 0; }
.address { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--sand); font-size: 15px; overflow-wrap: anywhere; }
.count-hint { font-size: 13px; color: var(--grey); text-align: right; }
.count-hint.over { color: var(--red); font-weight: 600; }
input[type="text"], input[type="email"], input[type="url"], input[type="date"], select, textarea, .rich {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid #d9d2c4; border-radius: 10px; background: #fff;
}
input:focus, select:focus, textarea:focus, .rich:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(180, 58, 68, .18); }
textarea { min-height: 110px; resize: vertical; }
input.big { font: 800 24px/1.15 var(--head); text-transform: uppercase; }
.row2 { display: grid; gap: 14px; }
@media (min-width: 700px) { .row2 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--red); }

.rich-wrap { border-radius: 10px; }
.rich-tools { display: flex; gap: 6px; margin-bottom: 6px; }
.rich-tools button { min-width: 40px; padding: 0 10px; font-size: 14px; height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font-weight: 700; }
.rich-tools button:hover { border-color: var(--ink); }
.rich { min-height: 90px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.rich.lead { font-size: 18px; }
.rich:empty::before { content: attr(data-placeholder); color: #9a958c; }
.rich a { color: var(--red); }

/* photos */
.photo { display: grid; gap: 10px; }
.photo-box { position: relative; border-radius: 12px; overflow: hidden; background: var(--sand-2); aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; }
.photo-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-box .ph { color: var(--grey); font-size: 15px; padding: 20px; text-align: center; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.photo-box.busy::after { content: "Uploading…"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(20, 20, 20, .55); color: #fff; font: 700 15px var(--head); letter-spacing: .1em; text-transform: uppercase; }
input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* blocks */
.blocks { display: grid; gap: 12px; }
.block { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: var(--r); padding: 14px; }
.block[data-type="quote"] { border-left-color: var(--red); }
.block[data-type="image"] { border-left-color: #8a7a5c; }
.block[data-type="button"] { border-left-color: var(--red-dk); }
.block-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.block-head .label { flex: 1; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.add-row .label { margin-right: 4px; color: var(--grey); }
.add-btn { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1.5px dashed var(--ink); background: transparent; cursor: pointer; font: 700 13px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; }
.add-btn:hover { background: var(--ink); color: #fff; border-style: solid; }
.insert { display: flex; justify-content: center; margin: -4px 0; }
.insert > button { border: 0; background: none; color: var(--grey); font-size: 13px; cursor: pointer; padding: 6px 10px; border-radius: 999px; }
.insert > button:hover { background: var(--sand-2); color: var(--ink); }
.insert .add-row { justify-content: center; padding: 8px; background: var(--sand); border-radius: 12px; }

/* problems + notices */
.notice { padding: 12px 14px; border-radius: 12px; background: var(--sand); font-size: 15px; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice-warn { background: var(--warn-bg); color: #5c3d00; }
.notice-error { background: #fbe9ea; color: var(--red-dk); }
.notice-good { background: var(--good-bg); color: #164f25; }
.notice-info { background: var(--info-bg); color: #183c66; }

/* SEO preview */
.serp { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-family: Arial, sans-serif; }
.serp .u { color: #1a1a1a; font-size: 13px; }
.serp .t { color: #1a0dab; font-size: 19px; line-height: 1.3; margin: 2px 0; }
.serp .d { color: #4d5156; font-size: 14px; }

/* history */
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.history li { display: flex; gap: 10px; }
.history time { color: var(--grey); min-width: 132px; }

/* people */
.people { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--r); overflow: hidden; }
.people th, .people td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.people th { font: 700 12px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; background: var(--sand); }
@media (max-width: 640px) {
  .people thead { display: none; }
  .people tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px; border-bottom: 1px solid var(--line); }
  .people td { padding: 0; border: 0; }
}

/* ---------------------------------------------------------------- sheet */
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-inner { width: min(460px, 100%); background: #fff; border-radius: 18px 18px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
@media (min-width: 640px) { .sheet { align-items: center; } .sheet-inner { border-radius: 18px; } }
.sheet-label { margin: 0; font: 700 12px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--grey); }
.sheet-name { margin: 0; font: 800 24px/1.1 var(--head); text-transform: uppercase; }
.sheet-sub { margin: 0 0 6px; color: var(--grey); }

/* ---------------------------------------------------------------- toast */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(140%); z-index: 80; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; max-width: calc(100% - 32px); transition: transform .25s, visibility .25s; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); visibility: hidden; }
.toast.show { transform: translateX(-50%) translateY(0); visibility: visible; }
.toast.bad { background: var(--red-dk); }

/* ------------------------------------------------------------- preview */
.preview { position: fixed; inset: 0; z-index: 70; background: #e9e5de; display: flex; flex-direction: column; }
.preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: var(--ink); color: #fff; font-size: 14px; }
.preview-bar > span { flex: 1; min-width: 180px; }
.preview-sizes { display: flex; gap: 4px; }
.preview-sizes button { min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1px solid #fff; background: transparent; color: #fff; cursor: pointer; font-size: 13px; }
.preview-sizes button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.preview-scroll { flex: 1; overflow: auto; padding: 16px; }
.preview-frame { margin: 0 auto; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .15); max-width: 1240px; transition: max-width .2s; }
.preview-frame.phone { max-width: 390px; }

/* The website's article styles (from revolver-redesign/site.css), scoped to the preview. */
.pv { --rv-red: #B43A44; --rv-grey: #5F5F5F; color: #141414; font-family: var(--body); }
.pv-hero { position: relative; min-height: 380px; display: flex; align-items: flex-end; color: #fff; background: #111; overflow: hidden; }
.pv-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.65)); }
.pv-hero-in { position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 90px 24px 48px; }
.pv-crumbs { font: 600 13px/1.4 var(--head); letter-spacing: .1em; text-transform: uppercase; opacity: .85; margin-bottom: 14px; }
.pv-eyebrow { font: 700 14px/1 var(--head); letter-spacing: .2em; text-transform: uppercase; color: #fff; display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pv-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--rv-red); }
.pv-h1 { font: 800 clamp(36px, 6vw, 76px)/.95 var(--head); text-transform: uppercase; margin: 0 0 16px; text-shadow: 0 0 32px rgba(0,0,0,.28); }
.pv-lead-hero { font-size: 19px; max-width: 640px; margin: 0; }
.pv-body { max-width: 820px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) 24px; }
.pv-article { font-size: 18px; line-height: 1.75; }
.pv-article .rv-article-lead { font-size: 21px; line-height: 1.6; }
.pv-article h2 { font: 800 clamp(24px, 3vw, 32px)/1.15 var(--head); text-transform: uppercase; margin: 1.6em 0 .5em; }
.pv-article figure { margin: 1.6em 0; }
.pv-article figure img { width: 100%; height: auto; border-radius: 16px; display: block; }
.pv-article figcaption { font-size: 14px; color: var(--rv-grey); margin-top: 8px; }
.pv-article blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--rv-red); font: 700 clamp(20px, 2.4vw, 26px)/1.35 var(--head); }
.pv-article blockquote p { margin: 0; }
.pv-article blockquote cite { display: block; margin-top: 8px; font: 600 14px/1.4 var(--body); letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: var(--rv-grey); }
.pv-article ul, .pv-article ol { padding-left: 1.2em; }
.pv-article a { color: var(--rv-red); }
.pv-btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.pv-btn { display: inline-flex; padding: 16px 30px; border-radius: 999px; background: var(--rv-red); color: #fff; font: 700 15px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.pv-btn.ghost { background: transparent; color: #141414; border: 2px solid #141414; }
.pv-phone .pv-hero { min-height: 420px; }
.pv-phone .pv-h1 { font-size: 40px; }
.pv-phone .pv-article { font-size: 17px; }

/* "Are you sure?" box */
.sheet.confirm { z-index: 90; }
.confirm-msg { margin: 6px 0 4px; font-size: 16px; }
.confirm-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.btn-danger-solid { background: var(--red); border-color: var(--red); }

/* header photo focus point */
.focus { display: grid; gap: 8px; }
.focus-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .focus-grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.focus-pick { position: relative; border-radius: 12px; overflow: hidden; background: #111; line-height: 0; }
.focus-pick.editable { cursor: crosshair; }
.focus-pick img { display: block; width: 100%; height: auto; user-select: none; }
.focus-dot { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 3px var(--red), 0 2px 10px rgba(0, 0, 0, .55); pointer-events: none; }
.focus-previews { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.fp { margin: 0; }
.fp-desk { grid-column: 1 / -1; }
.fp-img { border-radius: 10px; background: #ddd center / cover no-repeat; }
.fp-desk .fp-img { aspect-ratio: 3.2 / 1; }
.fp-phone .fp-img { aspect-ratio: 3 / 4; }
.fp-card .fp-img { aspect-ratio: 3 / 2; }
.fp figcaption { font-size: 13px; color: var(--grey); margin-top: 4px; }

