/* TTP shareable tools: shared styles. Brand tokens only. */
:root {
    /* Broadcast Light (site v2). Names kept so every tool page's own styles follow:
       --black is now the card surface, --white the ink, --gold the gold text tone,
       --ice the navy accent. Literal gold #DDB65C is kept for the one gold button. */
    --black: #FFFFFF;
    --black-soft: #EFEBE2;
    --panel: #FFFFFF;
    --blue: #00293E;
    --blue-deep: #001A2B;
    --blue-mid: #003652;
    --gold: #7A5E1C;
    --gold-fill: #DDB65C;
    --gold-light: #E8CC7A;
    --gold-dark: #C49A3C;
    --ice: #003652;
    --white: #00293E;
    --gray: #45626F;
    --gray-dim: #5E7480;
    --line: rgba(0, 41, 62, 0.12);
    --ground: #F7F5F0;
    --font-head: 'Montserrat', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--ground);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body.embed { background: var(--ground); height: auto; min-height: 0; overflow: hidden; }
html:has(body.embed) { height: auto; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

/* Compact header (hidden in embed mode) */
.tool-nav { border-bottom: 1px solid var(--line); background: rgba(245, 243, 238, 0.92); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); }
.tool-nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tool-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); }
.tool-brand img { height: 42px; width: auto; display: block; }
.tool-nav-links { display: flex; gap: 18px; align-items: center; font-size: 14px; font-weight: 600; color: var(--gray); }
.tool-nav-links a { text-decoration: none; }
.tool-nav-links a:hover { color: var(--white); }
.tool-nav-links .btn { padding: 10px 16px; font-size: 13px; }
@media (max-width: 640px) { .tool-nav-links a:not(.btn) { display: none; } }
body.embed .tool-nav, body.embed .tool-footer, body.embed .tool-intro-long { display: none; }

/* Shell */
.tool-shell { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; }
body.embed .tool-shell { padding: 12px 12px 16px; }
.tool-eyebrow { font-family: var(--font-head); font-weight: 700; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 10px; }
.tool-eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--gold); }
.tool-title { font-size: clamp(30px, 4.6vw, 46px); font-weight: 900; letter-spacing: -.02em; margin-top: 12px; color: var(--white); }
.tool-lead { color: var(--gray); margin-top: 12px; font-size: 17px; max-width: 60ch; }
body.embed .tool-title { font-size: 22px; }
body.embed .tool-lead { font-size: 15px; }

.tool-panel { margin-top: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 24px; box-shadow: 0 18px 40px -32px rgba(0, 41, 62, .35); }
.tool-panel + .tool-panel { margin-top: 14px; }
.tool-panel h2 { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.tool-help { color: var(--gray-dim); font-size: 14px; margin-top: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 13px 22px; font-family: var(--font-head); font-weight: 800; font-size: 15px; text-decoration: none; border: 1px solid transparent; white-space: nowrap; transition: transform .15s ease, border-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold-fill); color: #0B0B0C; }
.btn-gold:hover { box-shadow: 0 12px 26px -12px rgba(122, 94, 28, .7); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(0, 41, 62, 0.35); }
.btn-ghost:hover { border-color: var(--white); }
.btn-ice { background: rgba(0, 41, 62, 0.06); color: var(--white); border-color: rgba(0, 41, 62, 0.2); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold-fill); outline-offset: 2px; }

/* Inputs */
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--gray); }
.field input, .field select, .field textarea { width: 100%; background: var(--black); color: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: inherit; }
.field input::placeholder, .field textarea::placeholder { color: var(--gray-dim); }
.field textarea { min-height: 84px; resize: vertical; }
.fields { display: grid; gap: 14px; }
@media (min-width: 560px) { .fields.two { grid-template-columns: 1fr 1fr; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--black); color: var(--gray); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.chip.on { border-color: var(--white); color: #FFFFFF; background: var(--white); }
.range { width: 100%; accent-color: #00293E; }

/* Preview + actions */
.tool-preview { margin-top: 16px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--ground); position: relative; }
.tool-preview::after { content: "Preview of your image"; position: absolute; top: 10px; right: 10px; font: 700 10px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: #FFFFFF; background: rgba(0,41,62,.85); padding: 6px 9px; border-radius: 999px; pointer-events: none; }
.tool-preview.is-tappable::after { content: "Tap to choose"; background: var(--gold-fill); color: #0B0B0C; }
.tool-preview.is-tappable canvas { cursor: pointer; }
.tool-caption { margin-top: 8px; font-size: 13px; color: var(--gray-dim); }
.tool-preview canvas { display: block; width: 100%; height: auto; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tool-note { font-size: 13px; color: var(--gray-dim); margin-top: 10px; }
.tool-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #00293E; color: #FFFFFF; font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 9; }
.tool-toast.show { opacity: 1; }

/* Save-to-email */
.tool-save { margin-top: 14px; background: #F6ECD3; border: 1px solid rgba(122, 94, 28, 0.25); border-radius: 22px; padding: 24px; }
.tool-save h2 { color: var(--white); text-transform: none; letter-spacing: 0; font-size: 20px; font-weight: 800; }
.tool-save p { color: var(--gray); font-size: 15px; margin-top: 6px; }
.tool-save form { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 560px) { .tool-save form { grid-template-columns: 1fr 1.4fr auto; align-items: end; } }
.tool-save .fine { font-size: 12px; color: var(--gray-dim); margin-top: 8px; }
.tool-save.done form { display: none; }
.tool-save .done-msg { display: none; margin-top: 12px; color: var(--ice); font-weight: 600; }
.tool-save.done .done-msg { display: block; }

/* App bridge */
.tool-app { margin-top: 14px; border: 0; border-radius: 22px; padding: 22px 24px; background: #00293E; color: #FFFFFF; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.tool-app strong { display: block; font-family: var(--font-head); font-weight: 800; font-size: 17px; }
.tool-app span { color: rgba(255, 255, 255, .8); font-size: 14px; }

/* Embed code + share */
.tool-embedbar { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: var(--black-soft); font-size: 13px; color: var(--gray-dim); }
.tool-embedbar code { font-family: 'Space Grotesk', ui-monospace, monospace; color: var(--gray); font-size: 12px; }
.embed-badge { display: none; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--gray-dim); text-align: center; }
.embed-badge a { color: var(--gold); font-weight: 700; text-decoration: none; }
/* Site header and footer come from /js/site-nav.js; embeds hide them. */
body.embed #ttp-header, body.embed #ttp-footer { display: none !important; }
body.embed .embed-badge { display: block; }
body.embed .tool-embedbar { display: none; }

/* Footer */
.tool-footer { border-top: 1px solid var(--line); padding: 28px 20px; text-align: center; color: var(--gray-dim); font-size: 13px; }
.tool-footer a { color: var(--gray); text-decoration: none; margin: 0 8px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
