/* ==========================================================================
   /forritaskil/ — public API page (template-api.php)
   Same visual language as /streymi/nytt/ (css/streymi-nytt.css).
   ========================================================================== */

.fs-page {
    --fs-teal: var(--kvik-teal, #62b0ba);
    --fs-teal-dark: var(--kvik-teal-dark, #0d9488);
    --fs-ink: var(--kvik-ink, #1a1f24);
    --fs-muted: var(--kvik-muted, #6b7280);
    --fs-line: #e6eaed;
    --fs-bg: #f3f5f6;
    --fs-code-bg: #22272b;
    background: var(--fs-bg);
    color: var(--fs-ink);
    font-family: 'Open Sans', Arial, sans-serif;
    padding-bottom: 48px;
}
.fs-wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; box-sizing: border-box; }
.fs-page a { color: var(--fs-teal-dark); }
.fs-page code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .88em;
    padding: 1px 6px;
    border-radius: 5px;
    background: #e6f3f4;
    color: #0f5f59;
    border: 0;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.fs-hero {
    background:
        radial-gradient(900px 300px at 85% -40%, rgba(98, 176, 186, .45), transparent 70%),
        linear-gradient(135deg, #2b3034 0%, #383d40 60%, #2f4b50 100%);
    color: #fff;
    padding-block: 38px 34px;
}
.fs-hero__eyebrow {
    margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9fd6dc;
}
.fs-page .fs-hero__title {
    margin: 0; padding: 0; background: none;
    font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -.01em; line-height: 1.15; color: #fff;
}
.fs-hero__sub { margin: 10px 0 0; max-width: 680px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .82); }
.fs-hero__stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.fs-stat {
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 13.5px;
    color: rgba(255, 255, 255, .9);
}
.fs-stat strong { color: #fff; font-size: 14.5px; }
.fs-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.fs-page .fs-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: 999px;
    font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer;
    border: 1px solid transparent; transition: background .12s, border-color .12s, color .12s;
}
.fs-page .fs-btn--primary { background: var(--fs-teal-dark); color: #fff; }
.fs-page .fs-btn--primary:hover { background: #0b7f74; color: #fff; text-decoration: none; }
.fs-page .fs-btn--ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); color: #fff; }
.fs-page .fs-btn--ghost:hover { background: rgba(255, 255, 255, .16); color: #fff; text-decoration: none; }
.fs-page .fs-btn--outline { background: #fff; border-color: #d1d9dd; color: var(--fs-ink); }
.fs-page .fs-btn--outline:hover { border-color: var(--fs-teal); color: var(--fs-ink); text-decoration: none; }

/* ── Sections ──────────────────────────────────────────────────────────── */
.fs-section { margin-top: 34px; }
.fs-page .fs-section__head {
    background: none; padding: 0; width: auto;
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.fs-page .fs-section__head h2 {
    display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; background: none;
    font-size: 22px; font-weight: 800; color: var(--fs-ink);
}
.fs-section__link { font-size: 14px; font-weight: 700; text-decoration: none; }
.fs-section__link:hover { text-decoration: underline; }
.fs-note { color: var(--fs-muted); font-size: 14px; margin: 14px 0 0; }

.fs-ico { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto; display: inline-block;
    background-color: #e6f3f4; background-position: center; background-repeat: no-repeat; background-size: 18px; }
.fs-ico--code  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7l-5 5 5 5M16 7l5 5-5 5'/%3E%3C/svg%3E"); }
.fs-ico--data  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='2.2' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='M7 4v16M17 4v16M2 9h5M2 15h5M17 9h5M17 15h5'/%3E%3C/svg%3E"); }
.fs-ico--key   { background-color: #fff1e8; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ea580c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='M10.8 12.2L20 3M16 7l3 3M14 9l2 2'/%3E%3C/svg%3E"); }
.fs-ico--rules { background-color: #f3e8ff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239333ea' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }
.fs-ico--send  { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2L11 13M22 2l-7 20-4-9-9-4z'/%3E%3C/svg%3E"); }

/* ── Panels, cards ─────────────────────────────────────────────────────── */
.fs-panel {
    background: #fff; border-radius: 16px; padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 6px 16px rgba(0, 0, 0, .04);
}
.fs-panel p { margin: 0 0 4px; line-height: 1.6; }

.fs-code { position: relative; margin: 14px 0 0; padding: 30px 16px 16px; border-radius: 12px;
    background: var(--fs-code-bg); color: #e6edf0; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.fs-code__label { position: absolute; top: 9px; left: 16px; font-family: 'Open Sans', Arial, sans-serif;
    font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #9fd6dc; }
.fs-page .fs-code code { background: none; padding: 0; color: inherit; font-size: inherit; white-space: pre; }

.fs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.fs-card {
    background: #fff; border-radius: 14px; padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 6px 16px rgba(0, 0, 0, .04);
    transition: transform .15s ease, box-shadow .15s ease;
}
.fs-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0, 0, 0, .08), 0 14px 30px rgba(0, 0, 0, .07); }
.fs-page .fs-card h3 { margin: 0 0 8px; padding: 0; background: none; font-size: 16px; font-weight: 800; color: var(--fs-ink); }
.fs-card p { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: #4b5563; }

/* ── Plans ─────────────────────────────────────────────────────────────── */
.fs-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.fs-plan {
    display: flex; flex-direction: column; align-items: flex-start;
    background: #fff; border-radius: 16px; padding: 22px; border: 1px solid var(--fs-line);
}
.fs-plan--featured { background: linear-gradient(140deg, #ffffff 40%, #e6f3f4); border: 2px solid var(--fs-teal); }
.fs-page .fs-plan h3 { margin: 0; padding: 0; background: none; font-size: 19px; font-weight: 800; color: var(--fs-ink); }
.fs-plan__limits { margin: 4px 0 0; font-size: 14px; font-weight: 700; color: var(--fs-teal-dark); }
.fs-plan ul { margin: 14px 0 18px; padding: 0; list-style: none; font-size: 14.5px; line-height: 1.5; flex: 1; }
.fs-plan li { position: relative; padding-left: 24px; margin-bottom: 7px; }
.fs-plan li::before {
    content: ''; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%;
    background: #e6f3f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d9488' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* ── Rules ─────────────────────────────────────────────────────────────── */
.fs-rules { counter-reset: fs; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fs-rules li {
    counter-increment: fs; position: relative;
    background: #fff; border-radius: 12px; padding: 14px 16px 14px 54px;
    font-size: 14.5px; line-height: 1.55; border: 1px solid var(--fs-line);
}
.fs-rules li::before {
    content: counter(fs); position: absolute; left: 16px; top: 13px;
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: #f3e8ff; color: #9333ea; font-size: 13px; font-weight: 800;
}

/* ── Form ──────────────────────────────────────────────────────────────── */
.fs-form { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.fs-form label { display: flex; flex-direction: column; gap: 6px; flex: 1; font-size: 13.5px; font-weight: 700; color: #374151; }
.fs-page .fs-form input,
.fs-page .fs-form textarea,
.fs-page .fs-form select {
    width: 100%; box-sizing: border-box; margin: 0;
    padding: 10px 12px; border: 1px solid #d1d9dd; border-radius: 10px; background: #fff;
    font: inherit; font-size: 15px; font-weight: 400; color: var(--fs-ink);
}
.fs-page .fs-form input:focus,
.fs-page .fs-form textarea:focus,
.fs-page .fs-form select:focus { outline: none; border-color: var(--fs-teal); box-shadow: 0 0 0 3px rgba(98, 176, 186, .25); }
.fs-form__row { display: flex; gap: 14px; }
.fs-form__foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fs-form__foot .fs-note { margin: 0; }
.fs-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.fs-notice { padding: 14px 16px; border-radius: 12px; font-size: 15px; }
.fs-notice + .fs-form { margin-top: 16px; }
.fs-notice--ok { background: #e6f3f4; color: #0f5f59; border: 1px solid #b9dfe3; }
.fs-notice--err { background: #fff1e8; color: #9a3412; border: 1px solid #fed7aa; }

/* ── Contact nudge ─────────────────────────────────────────────────────── */
.fs-nudge {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-top: 34px; padding: 18px 20px; border-radius: 16px;
    background: linear-gradient(120deg, #e6f3f4, #f3e8ff);
    border: 1px solid #d6ecee;
}
.fs-nudge__text { display: flex; flex-direction: column; gap: 4px; }
.fs-nudge__text strong { font-size: 17px; }
.fs-nudge__text span { color: #4b5563; font-size: 14px; }

@media (max-width: 640px) {
    .fs-form__row { flex-direction: column; }
    .fs-hero { padding-block: 28px 26px; }
    .fs-panel, .fs-plan { padding: 16px; }
    .fs-section__head h2 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
    .fs-card { transition: none; }
}

/* ── Live numbers ──────────────────────────────────────────────────────── */
.fs-stat--live { position: relative; padding-left: 26px; }
.fs-stat--live::before {
    content: ''; position: absolute; left: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
    border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 3px rgba(94, 234, 212, .25);
}
.fs-card { display: flex; flex-direction: column; align-items: flex-start; }
.fs-card p { flex: 1; }
.fs-card__count {
    margin-top: 12px; padding: 3px 10px; border-radius: 999px;
    background: #e6f3f4; color: var(--fs-teal-dark); font-size: 12.5px; font-weight: 700;
}
.fs-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px !important; }
.fs-tags span {
    padding: 2px 10px; border-radius: 999px; border: 1px solid var(--fs-line);
    font-size: 12px; font-weight: 700; color: #4b5563; background: var(--fs-bg);
}
.fs-ico--live { background-color: #fdece8; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0654f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v12H5.2L4 17.2z'/%3E%3Cpath d='M8 9h8M8 12h5'/%3E%3C/svg%3E"); }
.fs-code code { display: block; max-height: 420px; overflow: auto; }