/* Papyrus console. Colours follow papyrus.ee: matte black, warm surfaces, the
   mark's gold as the single accent, bronze rules, and no rounded corners. */
:root {
  --bg: #0e0d0c;
  --bg2: #120f0c;
  --panel: #171009;
  --panel2: #1e150c;
  --gold: #dca943;
  --gold-bright: #fcc656;
  --gold-deep: #a8702a;
  --ink: #f3ead6;
  --text: #e2d6bd;
  --muted: #c0ae8c;
  --faint: #8f7f63;
  --line: #5a3a18;
  --line-soft: #3a2713;
  --edge: #96662a;
  --ok: #8fcf9f;
  --warn: #f0c36a;
  --bad: #e08a67;
  --radius: 0px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
::selection { background: rgba(220,169,67, 0.3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a2a1a; border-radius: 0; border: 2px solid var(--bg); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

h2.t { font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 22px; color: var(--ink); line-height: 1.25; }
h3.t { font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 18px; color: var(--ink); }
.hint { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.muted { color: var(--muted); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  padding: 10px 18px; border-radius: 0; cursor: pointer;
  font-size: 14.5px; font-weight: 500;
  transition: border-color .2s, background .2s, color .2s, filter .2s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(220,169,67,.05); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: linear-gradient(120deg, var(--gold-deep), var(--gold) 55%, var(--gold-bright)); color: #0e0d0c; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); color: #0e0d0c; }
.btn.big { padding: 14px 26px; font-size: 16px; }
.btn.danger { border-color: rgba(236, 146, 133, .4); color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); background: rgba(236, 146, 133, .08); color: var(--bad); }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { border-color: var(--line-soft); }
.btn.sm { padding: 7px 12px; font-size: 13.5px; }
.iconbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 0; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.iconbtn:hover { color: var(--gold-bright); border-color: var(--line-soft); background: rgba(255,255,255,.03); }
.iconbtn:disabled { opacity: .3; cursor: default; }

.field { display: grid; gap: 7px; }
.field > .lbl { font-size: 14px; font-weight: 500; color: var(--ink); }
.field > .lbl em { font-style: normal; font-weight: 400; color: var(--faint); }
.field > small { color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], select, textarea {
  width: 100%; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-soft);
  border-radius: 0; padding: 11px 14px; color: var(--ink); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input.big { font-size: 17px; padding: 13px 16px; }
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select option { background: var(--panel); }
input:focus, select:focus, textarea:focus, .rte:focus { border-color: rgba(220,169,67, .65); box-shadow: 0 0 0 3px rgba(220,169,67, .1); }
input::placeholder, textarea::placeholder { color: #8f7f63; }
input[type=range] { accent-color: var(--gold); width: 100%; }

.seg { display: inline-flex; border: 1px solid var(--line-soft); border-radius: 0; overflow: hidden; flex-wrap: wrap; }
.seg button { background: transparent; border: 0; padding: 8px 14px; cursor: pointer; font-size: 14px; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line-soft); }
.seg button.on { background: rgba(220,169,67, .18); color: var(--gold-bright); }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track { width: 44px; height: 24px; border-radius: 0; background: #3a2a1a; position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 0; background: #c0ae8c; transition: transform .2s, background .2s; }
.switch input:checked + .track { background: var(--gold-deep); }
.switch input:checked + .track::after { transform: translateX(20px); background: #0e0d0c; }

.check { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.check input { accent-color: var(--gold); width: 18px; height: 18px; flex: none; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stack { display: grid; gap: 16px; }
.spacer { flex: 1; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 0; font-size: 13px; border: 1px solid var(--line-soft); color: var(--text); white-space: nowrap; }
.chip.ok { color: var(--ok); border-color: rgba(134, 208, 168, .35); }
.chip.warn { color: var(--warn); border-color: rgba(233, 189, 108, .35); }
.chip.bad { color: var(--bad); border-color: rgba(236, 146, 133, .35); }
.chip.gold { color: var(--gold-bright); border-color: var(--line); }

.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 0; }
.pad { padding: 24px; }
.notice { display: flex; gap: 14px; align-items: flex-start; border: 1px solid rgba(233, 189, 108, .35); background: rgba(233, 189, 108, .07); color: #f3ead6; padding: 16px 18px; border-radius: 0; margin-bottom: 22px; }
.notice b { color: var(--warn); font-weight: 500; display: block; margin-bottom: 2px; }
.notice details { margin-top: 6px; font-size: 13px; color: var(--muted); }
.notice summary { cursor: pointer; }
.empty { color: var(--muted); padding: 28px 10px; text-align: center; }

/* ---------- sign in ---------- */
#login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(220,169,67, .09), transparent 70%), var(--bg); }
.login-box { width: 100%; max-width: 380px; text-align: center; }
.login-box img { width: 76px; margin: 0 auto 16px; display: block; filter: drop-shadow(0 0 16px rgba(252,198,86,.3)); }
.login-box h1 { font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 30px; color: var(--ink); margin: 4px 0 6px; }
.login-box form { margin-top: 28px; display: grid; gap: 14px; text-align: left; }
.login-box .btn { width: 100%; padding: 13px; margin-top: 4px; font-size: 16px; }
.login-err { color: var(--bad); font-size: 14px; min-height: 20px; text-align: center; }

/* ---------- shell ---------- */
#app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; background: var(--bg2); border-right: 1px solid var(--line-soft); padding: 22px 14px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 18px; text-decoration: none; }
.brand img { width: 40px; }
.brand b { display: block; font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 18px; color: var(--ink); line-height: 1.2; }
.brand small { display: block; font-size: 12px; color: var(--gold); }
.write-btn { width: 100%; margin-bottom: 14px; }
.nav { display: grid; gap: 3px; }
.nav button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 0; padding: 11px 12px; cursor: pointer; color: var(--muted); font-size: 15px; transition: background .2s, color .2s; }
.nav button:hover { color: var(--ink); background: rgba(255,255,255,.03); }
.nav button.on { color: var(--gold-bright); background: rgba(220,169,67, .12); }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding: 14px 6px 0; border-top: 1px solid var(--line-soft); }
main { min-width: 0; padding: 32px 40px 80px; max-width: 1480px; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 34px; line-height: 1.15; color: var(--ink); }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 640px; }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.save-state { font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.save-state.ok { color: var(--ok); }
.save-state.bad { color: var(--bad); }

/* ---------- home ---------- */
.actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.action-card { display: flex; gap: 16px; align-items: center; text-align: left; padding: 22px; cursor: pointer; color: inherit; transition: border-color .2s, transform .2s; }
.action-card:hover { border-color: var(--line); transform: translateY(-2px); }
.action-card .ic { width: 50px; height: 50px; border-radius: 0; display: grid; place-items: center; background: rgba(220,169,67,.12); color: var(--gold-bright); flex: none; }
.action-card .ic svg { width: 24px; height: 24px; }
.action-card b { display: block; font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 19px; color: var(--ink); }
.action-card span { display: block; color: var(--muted); font-size: 14px; }
.action-card.primary { background: linear-gradient(135deg, rgba(220,169,67,.16), rgba(220,169,67,.04)); border-color: var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.stat { padding: 20px 22px; }
.stat .n { font-family: 'Newsreader', Georgia, serif; font-size: 40px; color: var(--ink); line-height: 1.1; }
.stat .l { color: var(--muted); margin-top: 4px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bars { display: grid; gap: 16px; margin-top: 18px; }
.bar-row .top { display: flex; justify-content: space-between; color: var(--ink); margin-bottom: 7px; }
.bar { height: 8px; background: rgba(255,255,255,.06); border-radius: 0; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); border-radius: 0; }
.list { display: grid; margin-top: 10px; }
.list > div { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.list > div:last-child { border-bottom: 0; }
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; counter-reset: how; }
.how div { padding: 14px; border: 1px solid var(--line-soft); border-radius: 0; color: var(--muted); font-size: 14px; }
.how div b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 2px; }
.how div b::before { counter-increment: how; content: counter(how); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 0; background: rgba(220,169,67,.18); color: var(--gold-bright); font-size: 12px; margin-right: 8px; }

/* ---------- steps ---------- */
.steps { display: flex; gap: 6px; margin-bottom: 26px; flex-wrap: wrap; }
.steps button { flex: 1; min-width: 150px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 0; border: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-size: 15px; }
.steps button .num { width: 28px; height: 28px; border-radius: 0; display: grid; place-items: center; border: 1px solid var(--line); font-size: 13px; flex: none; }
.steps button.done .num { background: rgba(134, 208, 168, .15); border-color: rgba(134, 208, 168, .4); color: var(--ok); }
.steps button.on { border-color: var(--gold); color: var(--ink); background: rgba(220,169,67,.08); }
.steps button.on .num { background: var(--gold); color: #0e0d0c; border-color: var(--gold); }
.step-foot { position: sticky; bottom: 0; z-index: 6; display: flex; gap: 12px; align-items: center; margin-top: 26px; padding: 14px 18px; background: rgba(18,15,12,.96); backdrop-filter: blur(8px); border: 1px solid var(--line-soft); border-radius: 0; }

/* ---------- layout & style pickers ---------- */
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.layout-card { text-align: left; cursor: pointer; overflow: hidden; padding: 0; color: inherit; transition: border-color .2s, transform .2s; }
.layout-card:hover { border-color: var(--line); transform: translateY(-2px); }
.layout-card.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(220,169,67,.35); }
.layout-card .img { height: 130px; background: #241810 center/cover no-repeat; border-bottom: 1px solid var(--line-soft); }
.layout-card .txt { padding: 14px 16px; }
.layout-card b { display: block; font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 18px; color: var(--ink); }
.layout-card span { color: var(--muted); font-size: 13.5px; }
.style-card { width: 100%; cursor: pointer; text-align: left; padding: 10px; border-radius: 0; border: 1px solid var(--line-soft); background: var(--panel); color: inherit; transition: border-color .2s; }
.style-card:hover { border-color: var(--line); }
.style-card.on { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(220,169,67,.35); }
.style-sample { border-radius: 0; padding: 14px; }
.style-sample .inner { border: 1px solid; border-radius: 0; padding: 14px; }
.style-sample .aa { font-size: 22px; line-height: 1; }
.style-sample .bar { height: 3px; width: 34px; margin: 10px 0 9px; }
.style-sample .ln { height: 5px; border-radius: 0; opacity: .45; margin-top: 5px; }
.style-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 4px 2px; color: var(--ink); }
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; }
.style-new { display: grid; place-items: center; min-height: 150px; border-style: dashed; color: var(--muted); }

/* ---------- editor ---------- */
.editor { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(360px, 640px); gap: 24px; align-items: start; }
.editor-form { display: grid; gap: 16px; min-width: 0; }
.editor-preview { position: sticky; top: 20px; }
.preview-frame { background: #120f0c; border: 1px solid var(--line-soft); border-radius: 0; overflow: hidden; }
.preview-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); }
.preview-bar .inbox { flex: 1; min-width: 0; }
.preview-bar .inbox b { display: block; color: var(--ink); font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-bar .inbox span { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding: 10px 14px 0; }
.preview-stage { height: calc(100vh - 190px); min-height: 480px; display: flex; justify-content: center; background: #0a0908; }
.preview-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .3s ease; }
.preview-stage.mobile iframe { width: 380px; border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }

.section { background: var(--panel2); border: 1px solid var(--line-soft); border-radius: 0; scroll-margin-top: 20px; }
.section.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 3px rgba(220,169,67,.6); } 100% { box-shadow: 0 0 0 0 rgba(220,169,67,0); } }
.section-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line-soft); }
.section-head .nm { display: flex; align-items: center; gap: 10px; flex: 1; color: var(--gold-bright); font-weight: 500; }
.section-body { padding: 16px; display: grid; gap: 14px; }
.add-section { width: 100%; padding: 16px; border: 1px dashed var(--line); border-radius: 0; background: transparent; color: var(--gold-bright); cursor: pointer; font-size: 15px; display: flex; justify-content: center; align-items: center; gap: 10px; }
.add-section:hover { background: rgba(220,169,67,.06); border-style: solid; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border: 1px solid var(--line-soft); border-radius: 0; background: transparent; cursor: pointer; color: inherit; }
.tile:hover { border-color: var(--gold); background: rgba(220,169,67,.06); }
.tile .ic { width: 38px; height: 38px; border-radius: 0; background: rgba(220,169,67,.12); color: var(--gold-bright); display: grid; place-items: center; flex: none; }
.tile b { display: block; color: var(--ink); font-weight: 500; }
.tile span { display: block; color: var(--muted); font-size: 13px; }
details.more > summary { cursor: pointer; color: var(--gold); font-size: 14px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '+'; font-size: 16px; width: 14px; }
details.more[open] > summary::before { content: '−'; }
details.more > .inner { display: grid; gap: 14px; margin-top: 14px; }

/* rich text */
.rte-wrap { display: grid; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; padding: 5px; border: 1px solid var(--line-soft); border-bottom: 0; border-radius: 0; background: rgba(255,255,255,.025); }
.rte-bar.under { border: 0; background: transparent; padding: 6px 0 0; }
.rte-bar button { min-width: 34px; height: 32px; padding: 0 9px; border: 1px solid transparent; border-radius: 0; background: transparent; cursor: pointer; color: var(--text); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.rte-bar button:hover { border-color: var(--line-soft); background: rgba(255,255,255,.04); color: var(--gold-bright); }
.rte-bar .sep { width: 1px; height: 20px; background: var(--line-soft); margin: 0 4px; }
.rte-bar .seg button { height: auto; border-radius: 0; }
.rte { position: relative; min-height: 160px; padding: 13px 15px; background: rgba(255,255,255,.04); border: 1px solid var(--line-soft); border-radius: 0; color: var(--ink); line-height: 1.75; outline: none; overflow-wrap: anywhere; }
.rte.single { min-height: 0; border-radius: 0; font-size: 17px; }
.rte.is-empty::before { content: attr(data-placeholder); position: absolute; color: #8f7f63; pointer-events: none; }
.rte p { margin: 0 0 .75em; }
.rte p:last-child { margin-bottom: 0; }
.rte h3 { font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 20px; margin: .3em 0 .5em; color: var(--ink); }
.rte ul { padding-left: 22px; margin: 0 0 .75em; }
.rte a { color: var(--gold-bright); }
.rte b, .rte strong { color: #fff; font-weight: 600; }
.tok { display: inline-block; padding: 0 9px; margin: 0 1px; border-radius: 0; background: rgba(220,169,67,.2); color: var(--gold-bright); font-size: .88em; line-height: 1.6; user-select: all; }

/* photo */
.photo-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 150px; border: 1px dashed var(--line); border-radius: 0; background: rgba(255,255,255,.02); color: var(--gold-bright); cursor: pointer; font-size: 15px; }
.photo-empty:hover { background: rgba(220,169,67,.06); }
.photo-empty svg { width: 30px; height: 30px; }
.photo-set { display: flex; gap: 16px; align-items: center; }
.photo-set img { width: 160px; height: 110px; object-fit: cover; border-radius: 0; border: 1px solid var(--line-soft); background: #3a2a1a; }
.photo-set.logo img { object-fit: contain; padding: 10px; background: #3a2a1a; }
.photo-compact { display: grid; place-items: center; width: 100%; aspect-ratio: 1; border-radius: 0; border: 1px dashed var(--line); background: rgba(255,255,255,.02) center/cover no-repeat; color: var(--gold-bright); cursor: pointer; font-size: 13px; }
.products-grid { display: grid; gap: 12px; }
.product { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 14px; border: 1px solid var(--line-soft); border-radius: 0; }
.product .fields { display: grid; gap: 10px; }

/* recipients & review */
.choice { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--line-soft); border-radius: 0; cursor: pointer; background: var(--panel); }
.choice:hover { border-color: var(--line); }
.choice.on { border-color: var(--gold); background: rgba(220,169,67,.07); }
.choice input { accent-color: var(--gold); width: 20px; height: 20px; margin-top: 3px; flex: none; }
.choice b { display: block; color: var(--ink); font-weight: 500; font-size: 16px; }
.choice span { color: var(--muted); }
.topic-list { display: grid; gap: 8px; margin-top: 14px; }
.topic-list label { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: 0; cursor: pointer; }
.topic-list label.on { border-color: var(--line); background: rgba(220,169,67,.06); }
.topic-list input { accent-color: var(--gold); width: 18px; height: 18px; }
.count-note { font-size: 16px; color: var(--ink); margin-top: 16px; }
.count-note b { color: var(--gold-bright); font-weight: 500; }
.checklist { display: grid; gap: 10px; }
.checklist > div { display: flex; gap: 12px; align-items: flex-start; }
.checklist .mk { width: 24px; height: 24px; border-radius: 0; display: grid; place-items: center; flex: none; font-size: 13px; }
.checklist .ok .mk { background: rgba(134, 208, 168, .16); color: var(--ok); }
.checklist .no .mk { background: rgba(236, 146, 133, .16); color: var(--bad); }
.checklist .warn .mk { background: rgba(233, 189, 108, .16); color: var(--warn); }
.checklist a { cursor: pointer; text-decoration: underline; }
.success { text-align: center; max-width: 520px; margin: 40px auto; }
.success .big-check { width: 84px; height: 84px; border-radius: 0; margin: 0 auto 20px; display: grid; place-items: center; background: rgba(134, 208, 168, .14); color: var(--ok); }
.success .big-check svg { width: 40px; height: 40px; stroke-width: 2; }
.success h1 { font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 32px; color: var(--ink); }

/* tables & lists */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.t tr:hover td { background: rgba(255,255,255,.015); }
.who { color: var(--ink); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 16px; border-bottom: 1px solid var(--line-soft); }
.toolbar input[type=search] { max-width: 300px; }
.toolbar select { width: auto; min-width: 170px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 14px 16px; color: var(--muted); font-size: 14px; }
.email-row { display: flex; gap: 12px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.email-row .main { flex: 1; min-width: 220px; }
.email-row .main b { display: block; color: var(--ink); font-weight: 500; font-size: 16px; }
.email-row .main span { color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 24px; flex-wrap: wrap; }
.tabs button { padding: 12px 18px; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; font-size: 15px; margin-bottom: -1px; }
.tabs button.on { color: var(--gold-bright); border-bottom-color: var(--gold); }
.type-row { display: flex; gap: 16px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.type-row:last-child { border-bottom: 0; }
.type-row .main { flex: 1; min-width: 220px; }
.type-row .main b { display: block; font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 18px; color: var(--ink); }
.fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.font-opt { text-align: left; padding: 12px; border: 1px solid var(--line-soft); border-radius: 0; background: transparent; cursor: pointer; color: var(--ink); }
.font-opt.on { border-color: var(--gold); background: rgba(220,169,67,.08); }
.font-opt .aa { font-size: 21px; line-height: 1.2; }
.font-opt span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.color { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 0; cursor: pointer; }
.color input { width: 38px; height: 34px; border: 0; background: none; padding: 0; cursor: pointer; flex: none; }
.color input::-webkit-color-swatch-wrapper { padding: 0; }
.color input::-webkit-color-swatch { border: 1px solid rgba(255,255,255,.25); border-radius: 0; }
.color span { font-size: 14px; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(5,4,3,.8); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 0; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.modal.wide { max-width: 900px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.modal-head h2 { font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 22px; color: var(--ink); flex: 1; }
.modal-body { padding: 22px; display: grid; gap: 16px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.gallery button { position: relative; aspect-ratio: 1; border: 1px solid var(--line-soft); border-radius: 0; background: #120f0c center/cover no-repeat; cursor: pointer; overflow: hidden; }
.gallery button.contain { background-size: 70%; background-color: #3a2a1a; }
.gallery button:hover { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(220,169,67,.4); }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px; border: 2px dashed var(--line); border-radius: 0; text-align: center; color: var(--muted); }
.dropzone svg { width: 28px; height: 28px; color: var(--gold-bright); }
.dropzone.over { border-color: var(--gold); background: rgba(220,169,67,.07); }
.dropzone b { color: var(--ink); font-weight: 500; font-size: 16px; }
.progress { height: 10px; background: rgba(255,255,255,.07); border-radius: 0; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); transition: width .4s ease; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 200; opacity: 0; pointer-events: none; transition: all .3s ease; background: #241810; border: 1px solid var(--line); color: var(--ink); padding: 12px 14px 12px 20px; border-radius: 0; box-shadow: 0 16px 40px rgba(0,0,0,.45); max-width: calc(100vw - 40px); display: flex; gap: 14px; align-items: center; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
#toast.bad { border-color: rgba(236, 146, 133, .5); color: #f6cbc4; }

/* ---------- products ---------- */
.filter-chip { display: inline-flex; gap: 6px; align-items: center; padding: 7px 14px; border-radius: 0; border: 1px solid var(--line-soft); background: transparent; color: var(--text); cursor: pointer; font-size: 14px; }
.filter-chip em { font-style: normal; color: var(--faint); font-size: 12.5px; }
.filter-chip.on { border-color: var(--gold); color: var(--gold-bright); background: rgba(220,169,67,.1); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.pcard { position: relative; border: 1px solid var(--line-soft); border-radius: 0; background: var(--panel); overflow: hidden; }
.pcard.off .ph { opacity: .55; }
.pcard-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.pcard:hover { border-color: var(--line); }
.pcard .ph { aspect-ratio: 4 / 5; background: #241810 center/cover no-repeat; display: grid; place-items: center; color: var(--faint); font-size: 13px; }
.pc-body { padding: 12px 14px 14px; display: grid; gap: 2px; }
.pc-body b { color: var(--ink); font-weight: 500; font-size: 15.5px; }
.pc-order { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; background: rgba(14,13,12,.8); border-radius: 0; }
.cat-thumb { width: 64px; height: 64px; flex: none; border-radius: 0; background: #241810 center/cover no-repeat; border: 1px solid var(--line-soft); }
.chips-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips-edit input { width: auto; flex: 1; min-width: 180px; }
.chips-edit .chip .x { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 4px; font-size: 11px; opacity: .7; }
.chips-edit .chip .x:hover { opacity: 1; }
.ptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ptile { position: relative; aspect-ratio: 4 / 5; border-radius: 0; border: 1px solid var(--line-soft); background: #241810 center/cover no-repeat; }
.ptile.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--line); color: var(--gold-bright); cursor: pointer; font-size: 14px; }
.ptile.add:hover { background-color: rgba(220,169,67,.06); }
.main-badge { position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: 0; background: rgba(14,13,12,.85); color: var(--gold-bright); font-size: 11.5px; }
.ptile-tools { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; justify-content: center; gap: 2px; background: rgba(14,13,12,.85); border-radius: 0; }
.ptile-tools .iconbtn { width: 30px; height: 30px; color: var(--ink); }

/* ---------- website editor ---------- */
.web-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.web-stage { height: calc(100vh - 290px); min-height: 520px; border: 1px solid var(--line-soft); border-radius: 0; overflow: hidden; background: #0a0908; display: flex; justify-content: center; }
.webframe { width: 100%; height: 100%; border: 0; background: #0e0d0c; transition: width .3s ease; }
.web-stage.mobile .webframe { width: 390px; border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); }
.g-preview { margin-top: 6px; padding: 16px 18px; border-radius: 0; background: #fff; font-family: Arial, sans-serif; }
.g-url { color: #202124; font-size: 13px; }
.g-title { color: #1a0dab; font-size: 19px; margin-top: 4px; line-height: 1.3; }
.g-desc { color: #4d5156; font-size: 14px; margin-top: 4px; line-height: 1.5; }

/* ---------- enquiries ---------- */
.nav-badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 0; background: var(--gold); color: #0e0d0c; font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; }
.enq-row { display: flex; gap: 14px; align-items: center; width: 100%; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.enq-row:last-child { border-bottom: 0; }
.enq-row:hover { background: rgba(255,255,255,.02); }
.enq-row.unread { background: rgba(220,169,67,.05); }
.enq-row.unread b { color: var(--gold-bright); }
.enq-thumb { width: 48px; height: 48px; flex: none; border-radius: 0; background: #241810 center/cover no-repeat; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line-soft); }
.enq-main { flex: 1; min-width: 0; }
.enq-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.enq-top b { color: var(--ink); font-weight: 500; font-size: 15.5px; }
.enq-snippet { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.enq-side { display: grid; justify-items: end; gap: 6px; flex: none; }
.enq-about { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 0; }
.enq-about .enq-thumb { width: 64px; height: 64px; }
.enq-about b { display: block; color: var(--ink); font-weight: 500; font-size: 16px; }
.enq-message { white-space: pre-wrap; padding: 18px 20px; border-radius: 0; background: rgba(255,255,255,.03); border: 1px solid var(--line-soft); color: var(--ink); line-height: 1.7; font-size: 15.5px; }
.enq-contacts { display: flex; gap: 28px; flex-wrap: wrap; }
.enq-contacts > div { display: grid; gap: 2px; }
@media (max-width: 640px) { .enq-side .small { display: none; } }

/* ---------- spreadsheet import ---------- */
.imp-thumb { width: 40px; height: 48px; flex: none; border-radius: 0; background: #241810 center/cover no-repeat; border: 1px solid var(--line-soft); }
.imp-table td { vertical-align: top; }
.social-row { display: grid; grid-template-columns: 150px 1fr auto auto auto; gap: 8px; align-items: center; }
.social-row select, .social-row input { width: 100%; }
@media (max-width: 560px) { .social-row { grid-template-columns: 1fr auto auto auto; } .social-row select { grid-column: 1 / -1; } }
.imp-table tr.imp-bad td { opacity: .7; }

@media (max-width: 1180px) {
  .editor { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
  .preview-stage { height: 720px; }
}
@media (max-width: 900px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; z-index: 20; height: auto; min-width: 0; flex-direction: row; align-items: center; padding: 10px 12px; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .nav { min-width: 0; }
  .brand { padding: 0; }
  .brand img { width: 32px; }
  .brand span { display: none; }
  .write-btn { width: auto; margin: 0; padding: 8px 12px; font-size: 13.5px; }
  .write-btn .lbl-long { display: none; }
  .nav { display: flex; overflow-x: auto; gap: 2px; flex: 1; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { white-space: nowrap; padding: 8px 10px; font-size: 14px; width: auto; }
  .nav button svg { display: none; }
  .side-foot { display: none; }
  main { padding: 22px 16px 80px; }
  .actions-grid, .stats, .two, .grid2, .how { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 27px; }
  .page-head .actions { margin-left: 0; }
  .product { grid-template-columns: 1fr; }
  .product .photo-compact { max-width: 160px; }
  .steps button { min-width: 0; flex: 1 1 45%; font-size: 13.5px; padding: 10px; }
}

/* ---------- console additions ---------- */
/* One flat gold for the main action; the brighter gold is its hover only. */
.btn.primary { background: var(--gold); color: #0e0d0c; border-color: var(--gold); }
.btn.primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: #0e0d0c; filter: none; }
.btn.primary:disabled { background: var(--gold); border-color: var(--gold); }
/* Control edges are stronger than decorative rules so they can be seen. */
input[type=text], input[type=email], input[type=password], input[type=url], input[type=search], select, textarea, .rte { border-color: var(--edge); }
.rte-bar { border-color: var(--edge); }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .rte:focus-visible { outline: none; }
h1, h2.t, h3.t { letter-spacing: -0.01em; }
.notice.calm { border-color: var(--line); background: rgba(220,169,67,.08); color: var(--ink); }
.notice.calm b { color: var(--gold-bright); }
textarea.code { font-family: 'Fragment Mono', ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.7; white-space: pre; overflow-x: auto; resize: none; }

/* sign in */
.login-box img { width: 92px; filter: none; }
.login-box .kicker { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }

/* sidebar: brand, the website being worked on, who is signed in */
.brand { cursor: default; }
.brand img { width: 34px; }
.brand b { font-size: 17px; }
.brand small { letter-spacing: .16em; text-transform: uppercase; font-size: 10.5px; }
#siteBox { display: grid; gap: 8px; padding: 12px; margin: 0 0 12px; border: 1px solid var(--line-soft); background: var(--panel); }
.back-link { justify-self: start; background: transparent; border: 0; padding: 0; color: var(--muted); font-size: 13px; cursor: pointer; }
.back-link:hover { color: var(--gold-bright); }
.site-id { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.site-id img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.site-id b { display: block; font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 17px; color: var(--ink); line-height: 1.2; }
.site-id small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.site-id:hover small { color: var(--gold-bright); }
.site-initial { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; background: rgba(220,169,67,.14); color: var(--gold-bright); font-family: 'Newsreader', Georgia, serif; font-size: 19px; }
#who { display: grid; gap: 1px; padding: 0 6px 4px; min-width: 0; }
#who b { color: var(--ink); font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#who small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .btn { justify-content: flex-start; }

/* the list of websites */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.site-tile { display: grid; gap: 16px; padding: 22px; transition: border-color .2s; }
.site-tile:hover { border-color: var(--line); }
.site-tile-main { display: flex; align-items: center; gap: 16px; background: transparent; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; min-width: 0; }
.site-tile-main b { display: block; font-family: 'Newsreader', Georgia, serif; font-weight: 400; font-size: 24px; color: var(--ink); line-height: 1.2; }
.site-tile-main:hover b { color: var(--gold-bright); }
.site-logo { width: 60px; height: 60px; flex: none; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line-soft); }
.site-logo img { width: 42px; height: 42px; object-fit: contain; }
.site-logo .site-initial { width: 100%; height: 100%; background: transparent; font-size: 26px; }
.site-facts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; min-height: 28px; }

/* product card preview, in the website's own colours */
.site-card { border: 1px solid var(--sc-line, var(--line-soft)); background: var(--sc-bg, var(--panel2)); max-width: 360px; margin: 0 auto; position: relative; }
.site-card .img { aspect-ratio: 4 / 5; background: var(--sc-image, #241810) center/cover no-repeat; display: grid; place-items: center; color: var(--sc-muted, var(--faint)); }
.site-card .tag { position: absolute; top: 16px; left: 16px; padding: 6px 12px; background: rgba(0,0,0,.6); border: 1px solid var(--sc-accent, var(--gold)); color: var(--sc-accent, var(--gold-bright)); font-size: 9.5px; letter-spacing: .32em; text-transform: uppercase; }
.site-card .meta { padding: 20px 22px 24px; border-top: 1px solid var(--sc-line, var(--line-soft)); }
.site-card .meta b { display: block; font-family: var(--sc-font, 'Newsreader', Georgia, serif); font-weight: 500; font-size: 21px; color: var(--sc-ink, var(--ink)); }
.site-card .meta b em { font-style: italic; color: var(--sc-accent, var(--gold-bright)); }
.site-card .meta span { display: block; margin-top: 8px; font-size: 10.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--sc-muted, var(--muted)); }

.nav button.only-mobile { display: none; }
@media (max-width: 900px) {
  .nav button.only-mobile { display: flex; }
  #siteBox { display: flex; align-items: center; gap: 8px; padding: 0; margin: 0; border: 0; background: transparent; }
  #siteBox .site-id span { display: none; }
  #siteBox .back-link { font-size: 0; }
  #siteBox .back-link::before { content: '←'; font-size: 18px; }
  .site-grid { grid-template-columns: 1fr; }
}
