/* H$G Press Release Builder: black + metallic gold (matches thisishsg.com and the H$G Wall) */
:root {
  --bg: #000; --panel: #0b0b0b; --panel-2: #121110; --line: #3a3326;
  --text: #ece7da; --muted: #a39d8f;
  --gold-1: #C9A646; --gold-2: #E8C873; --gold-3: #8f7429;
  --gold: linear-gradient(135deg, #E8C873 0%, #C9A646 45%, #f3dc95 60%, #b8952f 100%);
  --ok: #9fd79a; --warn: #e8b46a; --danger: #e07a6a;
  --serif: "Cinzel", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
a { color: var(--gold-2); }

.app { max-width: 1200px; margin: 0 auto; padding: 24px 16px 28px; }

/* Header */
.masthead { text-align: center; padding-bottom: 18px; }
.eyebrow { margin: 0; font-size: 11px; letter-spacing: .35em; text-transform: uppercase; color: var(--muted); }
.title { margin: 8px 0 6px; font-family: var(--serif); font-weight: 900; letter-spacing: .06em; line-height: 1.05; }
.title small { display: block; font-size: clamp(14px, 2.6vw, 18px); letter-spacing: .4em; color: var(--gold-2); font-weight: 700; margin-bottom: 4px; }
.title span { display: block; font-size: clamp(26px, 6.4vw, 52px); background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 10px rgba(201,166,70,.25)); text-transform: uppercase; }
.subtitle { margin: 0 auto; max-width: 620px; font-size: clamp(14px, 2.4vw, 17px); font-style: italic; opacity: .92; }
.usage { margin: 10px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.usage b { color: var(--gold-2); }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.preview-col { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 14px; }

.panel { background: var(--panel); border-radius: 14px; padding: 18px; border: 1px solid transparent;
  background-image: linear-gradient(var(--panel), var(--panel)), var(--gold); background-origin: border-box; background-clip: padding-box, border-box; }

/* Form */
fieldset { border: 0; margin: 0 0 14px; padding: 0; }
legend { font-family: var(--serif); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); font-size: 15px; margin-bottom: 10px; padding: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; align-items: end; }
.field { display: block; margin-bottom: 10px; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.field em { color: var(--gold-2); font-style: normal; }
.field i { color: var(--muted); font-weight: 400; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; background: #050505; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold-2) 50%), linear-gradient(135deg, var(--gold-2) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 28px; }
input[type=date] { color-scheme: dark; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold-1); outline: none; box-shadow: 0 0 0 3px rgba(201,166,70,.18); }
.field.check { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; font-size: 13px; }
.field.check span { margin: 0; font-weight: 500; }
input[type=checkbox] { accent-color: var(--gold-1); width: 17px; height: 17px; }
.form-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.saved { font-size: 12px; color: var(--muted); }

/* Controls */
.controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; }
.tones { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ctl-label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.tones label { cursor: pointer; }
.tones input { position: absolute; opacity: 0; pointer-events: none; }
.tones span { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; }
.tones input:checked + span { border-color: var(--gold-1); color: #141006; background: var(--gold); font-weight: 600; }
.tones input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.link-btn { background: none; border: 0; color: var(--gold-2); cursor: pointer; font-size: 13px; padding: 4px 0; }

/* Status chips */
.status { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.chip { font-size: 12px; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line); color: var(--muted); }
.chip.need { border-color: var(--warn); color: var(--warn); }
.chip.ok { border-color: #4e7a4a; color: var(--ok); }

/* The press release "paper" */
.doc { background: #fbf8f1; color: #1d1a14; border-radius: 10px; padding: 28px 30px; box-shadow: 0 0 0 1px var(--gold-3), 0 10px 40px rgba(0,0,0,.6);
  border-top: 6px solid var(--gold-1); font-size: 14px; line-height: 1.6; max-height: 720px; overflow: auto; }
.doc .fir { font-size: 11px; font-weight: 700; letter-spacing: .18em; color: #6b5a24; margin: 0 0 12px; }
.doc h2 { font-family: Georgia, "Times New Roman", serif; font-size: 22px; line-height: 1.25; margin: 0 0 6px; color: #111; }
.doc .sub { font-style: italic; color: #4a4336; margin: 0 0 16px; }
.doc p { margin: 0 0 12px; }
.doc h3 { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #6b5a24; margin: 18px 0 6px; }
.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 0; }
.doc dt { font-weight: 700; }
.doc dd { margin: 0; overflow-wrap: anywhere; }
.doc a { color: #7a5f10; overflow-wrap: anywhere; }
.doc .end { text-align: center; font-weight: 700; margin: 18px 0 8px; letter-spacing: .2em; }
.doc .credit { text-align: center; font-size: 11px; color: #8a7a4a; margin: 0; }
.doc .ph { background: #f1e3b8; border-radius: 3px; padding: 0 2px; }

/* Actions */
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { appearance: none; border: 0; cursor: pointer; border-radius: 999px; padding: 10px 18px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; font-size: 12px; color: #141006; background: var(--gold); box-shadow: 0 4px 18px rgba(201,166,70,.22);
  text-decoration: none; display: inline-block; transition: transform .15s, filter .15s; }
.pill:hover { transform: translateY(-1px); filter: brightness(1.07); }
.pill.ghost { background: transparent; color: var(--gold-2); box-shadow: inset 0 0 0 1.5px var(--gold-1); }
.pill.small { padding: 6px 13px; font-size: 11px; }
.pill.dark { background: #0b0b0b; color: var(--gold-2); box-shadow: 0 0 0 1.5px #0b0b0b; font-size: 13px; padding: 12px 26px; }
.pill:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.toast { margin: -4px 0 0; min-height: 18px; font-size: 13px; color: var(--ok); }

/* CTA (Michael's copy) */
.cta { background: var(--gold); color: #141006; border-radius: 14px; padding: 22px 22px 20px; text-align: center; box-shadow: 0 10px 40px rgba(201,166,70,.25); }
.cta h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(19px, 3.4vw, 25px); line-height: 1.2; margin: 0 0 10px; letter-spacing: .02em; }
.cta p { margin: 0 auto 8px; max-width: 560px; font-size: 14.5px; }
.cta .tagline { font-family: var(--serif); font-weight: 700; font-size: 14px; margin-top: 12px; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.cta-link { color: #141006; font-weight: 600; font-size: 13px; }
.cta.pulse { animation: pulse 1.6s ease 2; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(232,200,115,.35), 0 10px 40px rgba(201,166,70,.4); } }

/* Tips */
.tips h2 { font-family: var(--serif); color: var(--gold-2); letter-spacing: .1em; text-transform: uppercase; font-size: 15px; margin: 0 0 8px; }
.tips ul { margin: 0; padding-left: 18px; font-size: 13.5px; }
.tips li { margin-bottom: 6px; }
.tips b { color: var(--text); }
.tips-cta { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }

.foot { margin-top: 26px; text-align: center; font-size: 12px; color: var(--muted); }

@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .preview-col { position: static; }
  .doc { max-height: none; }
}
@media (max-width: 520px) {
  .app { padding: 16px 10px 22px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .panel { padding: 14px 12px; }
  .doc { padding: 20px 16px; }
  .actions .pill { flex: 1 1 calc(50% - 8px); text-align: center; padding: 10px 8px; }
  .actions .pill:first-child { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .cta.pulse { animation: none; } .pill { transition: none; } }

/* Print / Save as PDF: only the press release, on white paper */
@media print {
  @page { margin: 18mm; }
  html, body { background: #fff !important; color: #000; }
  .masthead, .form, .controls, .status, .actions, .toast, .cta, .tips, .foot { display: none !important; }
  .app { padding: 0; max-width: none; }
  .layout { display: block; }
  .preview-col { position: static; display: block; }
  #doc { max-height: none; overflow: visible; box-shadow: none; border: 0; border-radius: 0; padding: 0; background: #fff; font-size: 11.5pt; }
  #doc a { color: #000; text-decoration: none; }
  #doc .ph { background: none; }
}
