/* Embeddable tools — /embed/<tool>/ (docs/EMBEDS.md). Lean frame layout; tool styles come from the tool's own CSS.
   Host look options (embed-theme.js) work through the custom properties below; defaults = ESP navy. */
:root { --embed-on-accent: #fff; --embed-ink: var(--navy); }
body.embed { margin: 0; padding: 0; background: #fff; }
.embed-clear body.embed { background: transparent; }
.embed-main { max-width: 860px; margin: 0 auto; padding: 16px 16px 8px; }
.embed-h1 { font-family: 'Patua One', Georgia, serif; color: var(--embed-ink); font-size: 1.6rem; line-height: 1.2; margin: 0 0 6px; }
.embed-sub { color: #425469; margin: 0 0 4px; }
.embed-notitle .embed-h1, .embed-notitle .embed-sub { display: none; }
.embed-main .lc { margin-top: 12px; }
.embed-sysfont body.embed, .embed-sysfont body.embed *, .embed-sysfont .embed-h1, .embed-sysfont .lc-label, .embed-sysfont .lc-step legend,
.embed-sysfont .lc-result h2, .embed-sysfont .lc-result h3, .embed-sysfont h2, .embed-sysfont h3 { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important; }

/* Accent: the tool's navy spots follow --navy; text on it follows --embed-on-accent; text in it follows --embed-ink. */
body.embed a { color: var(--embed-ink); }
body.embed .btn-primary, body.embed .btn-primary:hover { background: var(--navy); color: var(--embed-on-accent); }
body.embed .btn-ghost { color: var(--embed-ink); border-color: var(--navy); }
body.embed .btn-ghost:hover { background: var(--navy); color: var(--embed-on-accent); }
body.embed .lc-num { background: var(--navy); color: var(--embed-on-accent); }
body.embed .lc-chip input:checked + span { border-color: var(--navy); background: var(--navy); color: var(--embed-on-accent); }
body.embed .lc-step legend, body.embed .lc-label, body.embed .lc-odds, body.embed .lc-result h2, body.embed .lc-result h3 { color: var(--embed-ink); }
body.embed .lc-year-row input[type="text"]:focus { border-color: var(--navy); }

/* Credit: small, quiet, always there. */
.embed-credit { max-width: 860px; margin: 0 auto; padding: 10px 16px 14px; border-top: 1px solid #e3e7ec; font-size: .85rem; }
.embed-credit-link { display: inline-flex; align-items: center; gap: 8px; color: #5f6b78 !important; text-decoration: none; }
.embed-credit-logo { height: 22px; width: auto; opacity: .85; transition: opacity .15s; }
.embed-credit-link:hover .embed-credit-logo, .embed-credit-link:focus .embed-credit-logo { opacity: 1; }
.embed-credit-link:hover, .embed-credit-link:focus { text-decoration: underline; }

/* Historic Color Finder in a frame: accent follows the host's color too. */
body.embed .cf-num, body.embed .cf-chip input:checked + span, body.embed .cf-save-btn[aria-pressed="true"] { background: var(--navy); color: var(--embed-on-accent); border-color: var(--navy); }
body.embed .cf-step legend, body.embed .cf-style-name, body.embed .cf-card-name { color: var(--embed-ink); }
body.embed .cf-style:has(input:checked) { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
body.embed .cf-save-btn { border-color: var(--navy); color: var(--embed-ink); }
.embed-sysfont .cf-step legend, .embed-sysfont .cf-results h2, .embed-sysfont .cf-save h2, .embed-sysfont .cf-hoa h2 { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important; }

/* Blocked website note (functions/_embeds.js blockedPage) */
.embed-blocked { padding: 24px 16px; color: #425469; }
.embed-blocked a { color: #112e5b; text-decoration: underline; }

/* Small ESP logo top-right — branding the host can't crop off with the bottom credit. */
.embed-top { max-width: 860px; margin: 0 auto; padding: 10px 16px 0; display: flex; justify-content: flex-end; }
.embed-top a { display: inline-flex; line-height: 0; }
.embed-top img { height: 18px; width: auto; opacity: .7; transition: opacity .15s; }
.embed-top a:hover img, .embed-top a:focus img { opacity: 1; }
