@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Instrument+Sans:wght@400;500;600;700&display=swap");

/* Warm editorial palette. Light is ivory paper with deep teal; dark is
   warm charcoal with a lifted teal. One accent, used sparingly. */
:root {
  --ground: #15130F; --card: #1E1B16; --panel: #26221C; --ink: #F2ECE1; --muted: #A79E8F;
  --line: #322D25; --hair: #3C362D;
  --accent: #7CC4A9; --accent-deep: #1F5C4A; --accent-ink: #0F1512; --accent2: #E9A26B; --accent2-ink: #2A1B10;
  --gold: #D2AE5C; --gold-soft: #2E2716;
  --bad: #E58A80; --bad-soft: #3A211E;
  --ok: #7CCBB0; --ok-soft: #173229;
  --info: #9DB6D9; --info-soft: #1B2532;
  --btn: #F2ECE1; --btn-ink: #15130F; --btn-line: #F2ECE1;
  --shadow: 0 1px 0 rgba(0,0,0,0.35);
  --serif: Fraunces, "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}
html[data-theme="light"] {
  --ground: #F5F1EA; --card: #FFFFFF; --panel: #EBE4D8; --ink: #1E1B16; --muted: #6F685C;
  --line: #E3DBCD; --hair: #D6CEBF;
  --accent: #1F5C4A; --accent-deep: #163F33; --accent-ink: #FFFFFF; --accent2: #D9853B; --accent2-ink: #FFFFFF;
  --gold: #9C7A1F; --gold-soft: #F6ECD2;
  --bad: #B5433A; --bad-soft: #F8E3E0;
  --ok: #1E7A5E; --ok-soft: #DDF0E7;
  --info: #3C5F8F; --info-soft: #E2EAF5;
  --btn: #1E1B16; --btn-ink: #F6F2EA; --btn-line: #1E1B16;
  --shadow: 0 1px 2px rgba(30,27,22,0.06), 0 8px 24px -18px rgba(30,27,22,0.25);
  color-scheme: light;
}
html { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); line-height: 1.55; font-size: 16px; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 22px 5vw 80px; position: relative; }

/* chrome */
.topbar { margin-bottom: 22px; }
.brandrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brandlink { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--hair); background: var(--accent-deep); display: inline-flex; align-items: center; justify-content: center; }
.brandmark { border: none; background: transparent; border-radius: 10px; overflow: hidden; }
.brandmark svg { width: 36px; height: 36px; display: block; }
.wordmark { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: -0.01em; }
.wschip { display: inline-flex; align-items: center; gap: 10px; padding: 5px 12px 5px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); box-shadow: var(--shadow); }
.wslogo { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--panel); display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 600; font-size: 14px; color: var(--accent); flex: none; }
.wschip .wsswitch { border: none; background: transparent; padding: 2px 0; font-weight: 600; font-size: 15px; cursor: pointer; }
.wschip .wsswitch:focus { box-shadow: none; }
.wsname { font-weight: 600; font-size: 15px; }
/* plan meters */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 8px 0 18px; }
.meter { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.meter b { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.meter .n { font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.1; }
.meter span { font-size: 14px; color: var(--muted); }
.meter i { display: block; height: 6px; border-radius: 999px; background: var(--panel); overflow: hidden; }
.meter u { display: block; height: 100%; background: var(--accent); border-radius: 999px; text-decoration: none; transition: width 0.3s; }
.meter.near u { background: var(--accent2); }
.meter.full u { background: var(--bad); }
.meter.full .n { color: var(--bad); }
.meter small { color: var(--bad); font-size: 12.5px; line-height: 1.35; }
.meter.off { opacity: 0.7; }
.notice { border: 1px solid var(--bad); background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 10px 14px; font-size: 14.5px; margin: 0 0 12px; }
.notice.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.planpanel { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 26px 0 0; }
.planpanel h2 { margin: 0; }
.planpanel .tier { font-size: 13px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 10px; }
.notice.warn { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.more { display: inline-block; }
.more summary { list-style: none; display: inline-block; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { color: var(--ink); }
.more > .actions { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
details.sect { border-top: 1px solid var(--line); margin-top: 8px; }
details.sect > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; padding: 6px 0; }
details.sect > summary::-webkit-details-marker { display: none; }
details.sect > summary h2 { margin: 18px 0 8px; }
details.sect > summary::before { content: "+"; color: var(--muted); font-size: 20px; width: 16px; }
details.sect[open] > summary::before { content: "–"; }
.review { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; padding: 14px 18px; }
/* the composer: two steps */
.composer .step { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-top: 4px; }
.composer .stepn { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.kind { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; background: var(--card); position: relative; }
.kind:hover { border-color: var(--hair); }
.kind.on { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.kind.off { opacity: 0.55; cursor: not-allowed; }
.kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind b { font-size: 14.5px; }
.kind span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.kind .chip { align-self: flex-start; margin-top: 4px; }
/* finished video first on the card */
.finished { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 2px 0 6px; padding: 12px; background: var(--panel); border-radius: 12px; }
.finished video { width: 260px; max-width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 10px; display: block; }
.finished .side { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.finished .side b { font-size: 15px; }
.skipped { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }
.skipped summary { cursor: pointer; }
.swatches { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.swatches label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.swatches input[type="color"] { width: 34px; height: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); padding: 2px; cursor: pointer; }
.swatches input[type="text"] { width: 96px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; padding: 6px 8px; }
.preview { display: flex; gap: 6px; }
.preview i { width: 34px; height: 44px; border-radius: 5px; display: block; border: 1px solid var(--line); }
.spacer { flex: 1; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 16px; border-bottom: 1px solid var(--line); }
.nav a { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 10px 14px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; letter-spacing: 0.01em; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); border-bottom-color: var(--accent); }
.nav a svg, .themebtn svg { width: 17px; height: 17px; fill: currentColor; flex: none; }
.themebtn { font: inherit; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 50%; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.themebtn .sun { display: none; } html[data-theme="light"] .themebtn .sun { display: block; } html[data-theme="light"] .themebtn .moon { display: none; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; align-items: center; }
.subnav span.lbl { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-right: 4px; }
.subnav a { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; }
.subnav a:hover { color: var(--ink); border-color: var(--hair); }

/* type */
.eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
h1 { font-family: var(--serif); font-size: 38px; font-weight: 500; margin: 2px 0 8px; letter-spacing: -0.015em; line-height: 1.1; }
h2 { font-family: var(--serif); font-size: 26px; font-weight: 500; color: var(--ink); margin: 40px 0 8px; letter-spacing: -0.01em; }
h3 { font-family: var(--serif); font-size: 20px; font-weight: 500; margin: 20px 0 8px; }
.sub { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.sub b { color: var(--ink); font-weight: 600; }
.why { color: var(--muted); font-size: 15px; margin: 0; }
.why a, a.plain { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.why a:hover, a.plain:hover { border-bottom-color: currentColor; }
.empty { color: var(--muted); font-size: 16px; padding: 18px 0; }

/* controls */
.wsswitch, select, input[type="text"], input[type="url"], input[type="email"], input[type="password"], input[type="number"], input[type="datetime-local"], textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input[type="text"], input[type="url"], input[type="email"], input[type="password"], textarea { width: 100%; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.btn { font: inherit; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 6px; cursor: pointer; border: 1px solid var(--hair); background: transparent; color: var(--ink); text-decoration: none; display: inline-block; transition: background 0.12s, border-color 0.12s; }
.btn:hover { background: var(--panel); }
.btn.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn-line); }
.btn.primary:hover { opacity: 0.92; background: var(--btn); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.quiet { background: transparent; color: var(--muted); border-color: transparent; }
.btn.quiet:hover { color: var(--ink); background: var(--panel); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--bad); font-weight: 700; }
.qstatus { color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 6px; margin: 0 0 14px; align-items: center; flex-wrap: wrap; }
.tab { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.tab.active { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
code { background: var(--panel); padding: 1px 6px; border-radius: 4px; font-size: 13.5px; }

/* cards */
.cards { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--hair); border-radius: 8px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.card.posted { opacity: 0.78; border-left-color: var(--info); }
.card.priority { border-color: var(--gold); }
.card:has(.chip.draft) { border-left-color: var(--gold); }
.card:has(.chip.approved) { border-left-color: var(--ok); }
.card:has(.chip.error) { border-left-color: var(--bad); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.when { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.chip { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.chip.draft { background: var(--gold-soft); color: var(--gold); }
.chip.approved, .chip.posting { background: var(--ok-soft); color: var(--ok); }
.chip.posted { background: var(--info-soft); color: var(--info); }
.chip.error { background: var(--bad-soft); color: var(--bad); }
.chip.acct, .chip.kind, .chip.plat { background: var(--panel); color: var(--muted); }
.chip.tag { background: var(--gold-soft); color: var(--gold); text-transform: none; letter-spacing: 0; }
.pillar { margin-left: auto; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.ptext { margin: 0; font-size: 16px; white-space: pre-wrap; line-height: 1.6; }
.errline { color: var(--bad); font-size: 14px; margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.addbox { background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.row2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row2 input[type="text"], .row2 input[type="url"] { flex: 1; min-width: 200px; width: auto; }
.who { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.handle { font-family: var(--serif); font-weight: 500; font-size: 20px; }
.stats { margin-left: auto; color: var(--muted); font-size: 14px; white-space: nowrap; }
.showmore { background: none; border: none; color: var(--accent); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 6px 0; }
blockquote.why { border-left: 2px solid var(--hair); padding-left: 12px; margin: 0; }

/* media */
.media { display: flex; gap: 10px; flex-wrap: wrap; }
.media .m { position: relative; }
.media img { width: 180px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; background: var(--panel); cursor: zoom-in; display: block; }
.media img.tall { aspect-ratio: 9 / 16; width: 140px; }
.media img.wide { aspect-ratio: 1.91 / 1; width: 300px; }
.media video { width: 300px; border-radius: 6px; background: #000; display: block; }
.media .dl, .media .rm { position: absolute; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; background: rgba(20,18,14,0.7); color: #fff; text-decoration: none; border: none; cursor: pointer; }
.media .dl { right: 6px; bottom: 6px; } .media .rm { left: 6px; top: 6px; color: #F3B4AD; }
.artcard { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--panel); font-size: 14px; color: var(--muted); }
.artcard b { color: var(--ink); display: block; font-size: 15px; }
.lightbox { position: fixed; inset: 0; background: rgba(12,10,8,0.94); z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.lightbox img, .lightbox video { max-height: 86vh; max-width: 92vw; border-radius: 6px; }
.lightbox .lbbar { display: flex; gap: 10px; align-items: center; color: #F2ECE1; font-size: 14px; }
.lightbox .btn { color: #F2ECE1; border-color: #6a6257; }

/* home */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 6px 0 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; box-shadow: var(--shadow); }
.tile b { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; font-weight: 600; }
.tile span { font-family: var(--serif); font-size: 30px; font-weight: 500; }
.thumb { width: 110px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; background: var(--panel); flex: none; }
.hcard { flex-direction: row; align-items: flex-start; gap: 16px; }
.hcard .body { flex: 1; min-width: 0; }
.text { margin: 0; white-space: pre-wrap; font-size: 15.5px; max-height: 8.5em; overflow: hidden; }

/* forms and tables */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form .full { grid-column: 1 / -1; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0.01em; }
.form label input, .form label textarea, .form label select { font-weight: 400; color: var(--ink); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.check .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 8px; background: var(--gold); }
.check.done .dot { background: var(--ok); }
.check small { color: var(--muted); display: block; margin-top: 2px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.login { max-width: 420px; margin: 12vh auto; display: flex; flex-direction: column; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 36px; box-shadow: var(--shadow); }
@media (max-width: 720px) { .form { grid-template-columns: 1fr; } h1 { font-size: 30px; } }
