/* Speechwriter · WindEurope. Editorial restraint: white page, hairlines, one strong blue, the speech set like a manuscript. */
:root {
  --we-blue: #005596;
  --we-sky: #79bde8;
  --ink: #313131;
  --ink-2: rgba(49, 49, 49, .82);
  --ink-3: rgba(49, 49, 49, .7);
  --line: rgba(49, 49, 49, .14);
  --paper: #ffffff;
  --wash: #f4f8fb;
  --safe: #2e7d32;
  --verify: #a15c00;
  --wrong: #c62828;
  --ui: 'Manrope', system-ui, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --r: 14px;
  color-scheme: light;
}

html, body { background: var(--paper); color: var(--ink); }
body { font-family: var(--ui); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
::selection { background: var(--we-sky); color: #00284a; }
a { color: var(--we-blue); }
:focus-visible { outline: 2px solid var(--we-blue); outline-offset: 2px; border-radius: 6px; }

.shell { max-width: 820px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-3); }

/* Top bar */
.topbar { border-bottom: 1px solid var(--line); padding: 14px 0; position: sticky; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(6px); z-index: 20; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-logo { height: 30px; width: auto; }
.brand-name { font-weight: 600; color: var(--ink); letter-spacing: .01em; padding-left: 14px; border-left: 1px solid var(--line); }
.link-btn { background: none; border: 0; color: var(--we-blue); font-weight: 600; font-size: 14px; padding: 4px 0; }

/* Type */
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); margin: 0 0 8px; font-weight: 600; }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 5vw, 42px); line-height: 1.1; letter-spacing: -.01em; margin: 0; }
.lede { color: var(--ink-2); margin: 12px 0 0; max-width: 60ch; }
.page-head { padding: 40px 0 24px; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); font-weight: 700; margin: 0; }

/* Fields */
.field-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--paper); transition: border-color .2s, box-shadow .2s; }
.field:focus { outline: none; border-color: var(--we-blue); box-shadow: 0 0 0 3px rgba(0, 85, 150, .12); }
.area { resize: vertical; min-height: 110px; padding-right: 56px; line-height: 1.55; }
.form-error { color: var(--wrong); font-size: 14px; margin: 12px 0 0; }

/* Buttons: ghost pill that fills on hover; solid for the forward step */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--we-blue); color: var(--we-blue); background: transparent; border-radius: 999px; padding: 11px 22px; font-weight: 600; font-size: 15px; text-decoration: none; transition: background .2s, color .2s; }
.pill:hover { background: var(--we-blue); color: #fff; }
.pill-solid { background: var(--we-blue); color: #fff; }
.pill-solid:hover { background: #00467c; }
.pill:disabled { opacity: .45; pointer-events: none; }
.actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.actions .muted { margin-right: auto; }

/* Login */
.login-card { max-width: 380px; margin: 12vh auto 0; }

/* Speech list */
.speech-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.speech-list li { border-bottom: 1px solid var(--line); }
.speech-list a { display: flex; justify-content: space-between; gap: 16px; padding: 18px 4px; text-decoration: none; color: var(--ink); }
.speech-list a:hover .sl-title { color: var(--we-blue); }
.sl-title { font-family: var(--serif); font-size: 20px; }
.sl-meta { color: var(--ink-3); font-size: 14px; white-space: nowrap; }

/* Steps indicator */
.steps { list-style: none; display: flex; gap: 6px; padding: 28px 0 0; margin: 0; flex-wrap: wrap; }
.steps li { font-size: 13px; color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; }
.steps li span { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); display: inline-grid; place-items: center; font-size: 12px; }
.steps li.done { color: var(--ink-2); cursor: pointer; }
.steps li.done span { background: var(--we-sky); border-color: var(--we-sky); color: #00284a; }
.steps li.current { color: var(--we-blue); background: var(--wash); }
.steps li.current span { background: var(--we-blue); border-color: var(--we-blue); color: #fff; }

/* Questions */
.meta-row { margin-bottom: 8px; }
.question { padding: 28px 0; border-top: 1px solid var(--line); }
.q-head { display: flex; gap: 14px; align-items: flex-start; }
.q-num { font-family: var(--serif); font-size: 26px; line-height: 1; color: var(--we-blue); min-width: 22px; }
.q-title { font-weight: 700; font-size: 17px; display: block; }
.q-help { color: var(--ink-2); margin: 4px 0 0; }
.req { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--we-blue); font-weight: 700; margin-left: 6px; }
.q-more { margin: 10px 0 12px 36px; font-size: 14px; color: var(--ink-2); }
.q-more summary { color: var(--we-blue); font-weight: 600; cursor: pointer; width: fit-content; }
.q-more ul { margin: 8px 0 0; padding-left: 18px; }
.q-more li { margin: 3px 0; }
.question .mic-field { margin-left: 36px; }

/* Microphone */
.mic-field { position: relative; }
.mic { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.mic::before { content: ''; width: 16px; height: 16px; background: var(--we-blue); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V22h2v-3.08A7 7 0 0 0 19 12h-2Z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.92V22h2v-3.08A7 7 0 0 0 19 12h-2Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.mic:hover { border-color: var(--we-blue); }
.mic.connecting { background: var(--wash); }
.mic.recording { background: var(--wrong); border-color: var(--wrong); animation: pulse 1.4s ease-in-out infinite; }
.mic.recording::before { background: #fff; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, .35); } 50% { box-shadow: 0 0 0 8px rgba(198, 40, 40, 0); } }
.interim { color: var(--ink-3); }

/* Structure */
.movement { padding: 22px 0 6px; border-top: 1px solid var(--line); }
.movement:first-child { border-top: 0; }
.movement h3 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--we-blue); font-weight: 700; margin: 0 0 10px; }
.points { list-style: none; padding: 0; margin: 0; }
.points li { display: grid; grid-template-columns: 34px 1fr; padding: 8px 0; }
.p-n { font-family: var(--serif); color: var(--ink-3); }
.p-text { font-family: var(--serif); font-size: 19px; line-height: 1.4; }
.p-data { display: block; font-family: var(--ui); font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.p-changed .p-text { background: linear-gradient(transparent 62%, rgba(121, 189, 232, .45) 0); }

/* Sources (small print under the structure) */
.sources { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); }
.sources-title { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-3); font-weight: 700; margin: 0 0 8px; }
.sources ol { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.5; color: var(--ink-3); }
.sources li { margin: 2px 0; }
.sources .src-title { color: var(--ink-2); }

/* Manuscript */
.manuscript { font-family: var(--serif); font-size: 20px; line-height: 1.65; padding: 8px 0 12px; }
.manuscript p { margin: 0 0 1.05em; max-width: 64ch; position: relative; }
.manuscript mark { background: none; padding: 0; border-bottom: 1px dotted var(--ink-3); color: inherit; transition: background .2s; }
.manuscript mark.hl { background: rgba(121, 189, 232, .45); border-radius: 2px; }
.manuscript .changed { background: linear-gradient(transparent 62%, rgba(121, 189, 232, .3) 0); }

/* Facts */
.facts { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 24px; }
.fact-list { list-style: none; padding: 0; margin: 14px 0 0; }
.fact-list li { display: grid; grid-template-columns: 30px 92px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; scroll-margin-top: 90px; }
.f-n { color: var(--ink-3); font-size: 13px; padding-top: 2px; text-decoration: none; }
.f-n:hover { color: var(--we-blue); }
.fact-list li:target { background: var(--wash); }
/* Footnote markers in the text */
sup.fn { font-family: var(--ui); font-size: 0.55em; line-height: 0; margin-left: 1px; vertical-align: super; }
sup.fn a { color: var(--we-blue); text-decoration: none; }
sup.fn a:target, .manuscript mark:target { background: var(--wash); }
sup.fn a { scroll-margin-top: 120px; }
.chip { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; height: fit-content; width: fit-content; }
.chip-Safe { color: var(--safe); background: rgba(46, 125, 50, .09); }
.chip-Verify { color: var(--verify); background: rgba(161, 92, 0, .1); }
.chip-Corrected { color: var(--we-blue); background: rgba(0, 85, 150, .08); }
.f-span { font-weight: 600; }
.f-detail { display: block; color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.f-detail a { word-break: break-word; }
.f-was { text-decoration: line-through; color: var(--ink-3); }

/* Notes and feedback */
.note { background: var(--wash); border-left: 3px solid var(--we-sky); padding: 12px 14px; border-radius: 0 10px 10px 0; color: var(--ink-2); font-size: 15px; }
.feedback { border-top: 1px solid var(--line); margin-top: 28px; padding: 24px 0 24px; }
.step-view { padding-bottom: 72px; }
.opt { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 700; margin-left: 6px; }

/* Copy on hover: appears on hover or focus, always visible on touch */
.copy-wrap { position: relative; }
.copy-btn { position: absolute; top: 2px; right: -6px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; opacity: 0; transition: opacity .15s, border-color .15s; z-index: 2; }
.copy-btn::before { content: ''; width: 15px; height: 15px; background: var(--ink-2); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E") center / contain no-repeat; }
.copy-btn.ok::before { background: var(--safe); -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.copy-btn:hover { border-color: var(--we-blue); }
.copy-wrap:hover > .copy-btn, .copy-wrap:focus-within > .copy-btn, .copy-btn:focus-visible { opacity: 1; }
@media (hover: none) { .copy-btn { opacity: .85; } }
.manuscript p.copy-wrap { padding-right: 34px; }

/* Progress overlay */
.overlay { position: fixed; inset: 0; background: rgba(255, 255, 255, .86); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; padding: 16px; }
.overlay[hidden] { display: none; }
.overlay-card { width: min(440px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; box-shadow: 0 20px 60px rgba(0, 40, 74, .12); }
.progress-text { font-family: var(--serif); font-size: 22px; margin: 0 0 16px; }
.bar { height: 4px; background: var(--wash); border-radius: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; width: 8%; background: var(--we-blue); transition: width .4s ease; }
.bar.indeterminate span { width: 30%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }

.view[hidden], .step-view[hidden] { display: none !important; }

@media (max-width: 575px) {
  .question .mic-field, .q-more { margin-left: 0; }
  .fact-list li { grid-template-columns: 24px 1fr; }
  .fact-list li .f-n { grid-row: span 2; }
  .fact-list li .chip { grid-column: 2; }
  .fact-list li .f-body { grid-column: 2; }
  .manuscript { font-size: 18px; }
  .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
