:root { color-scheme: light; --ink: #263b35; --muted: #5f6e66; --paper: #f7f8f3; --line: #dce3db; --green: #31594a; --error: #a33830; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.55; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.site-header { max-width: 1160px; margin: 0 auto; padding: 26px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font-size: 23px; font-weight: 700; letter-spacing: -.8px; }
.mark { color: var(--green); font-size: 33px; font-weight: 400; }
.header-note, .hint, .privacy-note, footer { color: var(--muted); font-size: 13px; }
main { max-width: 1160px; padding: 0 32px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: start; padding: 26px 0 36px; }
.intro { max-width: 620px; padding-top: 8px; }
.eyebrow { color: var(--green); font-size: 11px; letter-spacing: 2px; font-weight: 700; margin: 0 0 16px; }
h1 { font-size: clamp(38px, 5vw, 56px); font-weight: 600; line-height: 1.06; letter-spacing: -2px; margin: 0 0 20px; }
.intro h1 { font-size: clamp(34px, 4vw, 48px); }
.intro > p:not(.eyebrow) { color: var(--muted); font-size: 17px; margin: 0; max-width: 480px; }
.intro > p.intro-facts { color: var(--ink); font-size: 14px; font-weight: 600; margin-top: 16px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
h2 { font-weight: 600; font-size: 19px; line-height: 1.35; letter-spacing: -.3px; margin: 0 0 20px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.optional { margin-left: 5px; color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; outline: none; }
input::placeholder, textarea::placeholder { color: #68766e; }   /* 4.77:1 on white (WCAG AA 4.5); --muted is 5.03:1 on paper */
textarea { min-height: 235px; resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px #31594a18; }
button:focus-visible, a:focus-visible { outline: 3px solid #80a692; outline-offset: 3px; }
.hint { margin: 7px 0 19px; }
.options { display: grid; grid-template-columns: 1fr 1fr 1.12fr; gap: 12px; margin-top: 20px; }
select { font-size: 13px; padding: 11px 8px; min-height: 46px; }
button, .secondary { cursor: pointer; border-radius: 8px; min-height: 44px; font-weight: 600; padding: 10px 15px; }
button:disabled { cursor: default; opacity: .5; }
.primary { background: var(--green); color: #fff; border: 1px solid var(--green); min-width: 154px; }
.primary span { margin-left: 14px; }
.primary:hover:enabled { background: #234536; }
.secondary { border: 1px solid var(--line); color: var(--ink); background: #f9fbf7; display: inline-block; text-align: center; text-decoration: none; font-size: 13px; }
.secondary:hover:enabled, a.secondary:hover { background: #eef3ed; }
.text-button { border: 0; background: transparent; color: var(--green); padding: 8px 0; font-size: 13px; min-height: 44px; text-align: left; }
.text-button:hover:enabled { text-decoration: underline; }
.create-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 25px; }
.create-row .hint { margin: 0; }
.side-column { min-width: 0; display: grid; gap: 20px; }
.muted { color: var(--muted); font-size: 14px; margin: -6px 0 22px; }
.account .secondary { width: 100%; margin-top: 12px; }
.account .text-button { display: block; }
.quota { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -.6px; }
.error { color: var(--error); font-size: 13px; margin: 15px 0 0; overflow-wrap: anywhere; }
.privacy-note { margin: 0; padding: 0 4px; }
.result { scroll-margin-top: 20px; }
#status-message { margin: 0 0 12px; font-size: 14px; overflow-wrap: anywhere; }
progress { width: 100%; height: 7px; display: block; appearance: none; border: 0; border-radius: 5px; overflow: hidden; background: #eaf0e9; }
progress::-webkit-progress-bar { background: #eaf0e9; }
progress::-webkit-progress-value { background: #59816b; }
progress::-moz-progress-bar { background: #59816b; }
video { width: 100%; max-height: 410px; background: #eef1eb; border-radius: 8px; margin-top: 6px; }
.result-actions { display: grid; gap: 5px; margin-top: 12px; }
/* W4: Copy link first, with "Also share the script" beside it */
.share-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 12px; }
.share-box .primary { min-width: 0; width: auto; }
.share-box .share-title { flex: 1 0 100%; }
.share-box .share-title label { font-size: 13px; }
.share-box .check { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 13px; margin: 0; }
.share-box .check input { width: auto; margin: 0; }
.share-done { margin-top: 8px; }
.share-done p { margin: 0; overflow-wrap: anywhere; }
.result .hint { margin-bottom: 0; }
.rate { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.rate fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.rate legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.stars { display: flex; gap: 6px; }
.stars label { flex: 1; margin: 0; text-align: center; border: 1px solid var(--line); border-radius: 8px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-weight: 600; }
.stars input { width: auto; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rate .chips legend { font-size: 13px; }
.chips label { margin: 0; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 20px; font-weight: 400; cursor: pointer; }
.chips input { width: auto; margin: 0; }
.rate .check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 12px 0; }
.rate .check input { width: auto; margin: 0; }
.rate .secondary { width: 100%; }
footer { text-align: center; padding: 40px 20px 28px; }
.examples h2 { margin-bottom: 4px; }
.examples > .hint { margin: 0 0 14px; }
/* auto-fit: one example fills the column; more share it */
.example-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.example-grid figure { margin: 0; }
.example-grid figure.chosen { outline: 3px solid #80a692; outline-offset: 6px; border-radius: 8px; }
.example-grid .example-note { color: var(--green); margin: 8px 0 0; }
/* 11/07: a fixed 16:9 box, so the hero does not jump when each example's poster and metadata load (layout shift) */
.example-grid video { margin: 0; max-height: 320px; width: 100%; aspect-ratio: 16 / 9; background: #e9ece8; object-fit: contain; }
.example-grid .primary { width: 100%; margin-top: 10px; }
.example-grid figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; overflow-wrap: anywhere; }
.example-script { margin: 10px 0; padding: 10px 12px; border-left: 3px solid var(--line); font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9.5em; overflow-y: auto; }
/* 11/07 use-case pages (dossier backlog #16): the pitch beside one example, its whole script, and a link as the main button */
a.primary { display: block; text-align: center; text-decoration: none; border-radius: 8px; min-height: 44px; font-weight: 600; padding: 10px 15px; }
a.primary:hover { background: #234536; }
.landing .intro > p + p { margin-top: 12px; }
.landing .example-script { max-height: none; }
footer nav a { white-space: nowrap; }
.prose { max-width: 720px; margin: 10px 0 0; }
.prose h1 { font-size: clamp(32px, 4vw, 44px); }
.prose h2 { margin: 28px 0 8px; }
.prose p { margin: 0 0 12px; }
@media (max-width: 760px) {
  .site-header { padding: 18px 20px; }
  .header-note { display: none; }
  main { padding: 0 20px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 16px 0 28px; }
  .intro { padding-top: 0; }
  .intro > p:not(.eyebrow) { font-size: 15px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .card { padding: 21px; border-radius: 12px; }
  .side-column { gap: 16px; }
  .options { grid-template-columns: 1fr; gap: 14px; }
  select { font-size: 15px; }
  input, textarea { font-size: 16px; }
  .create-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .primary { width: 100%; }
}
.script-length { margin-top: -12px; }
.script-length:empty { display: none; }
