/* ===========================================================================
   Habibi TTS - design system
   ---------------------------------------------------------------------------
   One neutral scale + one accent. No gradients, no glows, no second accent.
   Colour is reserved for two jobs: the primary action, and money/credit values.
   Everything else is neutral and separated by space, weight and hairlines.

   Tailwind handles LAYOUT (flex/grid/spacing) in the templates.
   This file handles LOOK (colour, borders, states) via component classes,
   so a template never hardcodes a palette.
   =========================================================================== */

:root {
    color-scheme: dark;

    /* Neutral ramp - true grey, not blue-grey */
    --c-canvas: 10 10 11;
    --c-surface: 24 24 27;
    --c-sunken: 16 16 18;
    --c-line: 39 39 42;
    --c-line-strong: 63 63 70;

    --c-ink: 250 250 250;
    --c-ink-2: 161 161 170;
    --c-ink-3: 113 113 122;

    /* The single accent */
    --c-accent: 16 185 129;
    --c-accent-soft: 6 78 59;
    --c-on-accent: 9 9 11;

    --c-danger: 244 63 94;
    --c-warn: 234 179 8;

    --radius: 10px;
    --radius-lg: 14px;
}

/* Dark is the product's default look, not a system-following preference.
   Light stays available, but only when the viewer asks for it via the toggle. */
:root[data-theme="light"] {
    color-scheme: light;
    --c-canvas: 250 250 250;
    --c-surface: 255 255 255;
    --c-sunken: 244 244 245;
    --c-line: 228 228 231;
    --c-line-strong: 212 212 216;
    --c-ink: 24 24 27;
    --c-ink-2: 82 82 91;
    --c-ink-3: 113 113 122;
    --c-accent: 5 150 105;
    --c-accent-soft: 209 250 229;
    --c-on-accent: 255 255 255;
    --c-danger: 225 29 72;
    --c-warn: 161 98 7;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

html,
body {
    background: rgb(var(--c-canvas));
    color: rgb(var(--c-ink));
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgb(var(--c-accent) / 0.25);
    color: rgb(var(--c-ink));
}

:focus-visible {
    outline: 2px solid rgb(var(--c-accent));
    outline-offset: 2px;
}

.ar {
    font-family: "Cairo", system-ui, sans-serif;
}

.mono {
    font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Typography helpers
   -------------------------------------------------------------------------- */

.t-title {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: rgb(var(--c-ink));
}

.t-section {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgb(var(--c-ink));
}

.t-body {
    font-size: 0.875rem;
    color: rgb(var(--c-ink-2));
    line-height: 1.6;
}

.t-muted {
    font-size: 0.8125rem;
    color: rgb(var(--c-ink-3));
}

.t-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(var(--c-ink-3));
}

.t-accent {
    color: rgb(var(--c-accent));
}

.t-danger {
    color: rgb(var(--c-danger));
}

/* --------------------------------------------------------------------------
   Surfaces
   -------------------------------------------------------------------------- */

.card {
    background: rgb(var(--c-surface));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-lg);
}

.card-pad {
    padding: 1.25rem;
}

.sunken {
    background: rgb(var(--c-sunken));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius);
}

.divide-line > * + * {
    border-top: 1px solid rgb(var(--c-line));
}

.hr {
    height: 1px;
    background: rgb(var(--c-line));
    border: 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5625rem 0.9375rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-size: 0.8125rem;
    font-weight: 550;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
    white-space: nowrap;
    text-decoration: none;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: rgb(var(--c-accent));
    color: rgb(var(--c-on-accent));
}

.btn-primary:hover:not(:disabled) {
    background: rgb(var(--c-accent) / 0.88);
}

.btn-secondary {
    background: rgb(var(--c-sunken));
    color: rgb(var(--c-ink));
    border-color: rgb(var(--c-line));
}

.btn-secondary:hover:not(:disabled) {
    border-color: rgb(var(--c-line-strong));
}

.btn-ghost {
    background: transparent;
    color: rgb(var(--c-ink-2));
}

.btn-ghost:hover:not(:disabled) {
    background: rgb(var(--c-sunken));
    color: rgb(var(--c-ink));
}

.btn-danger {
    background: transparent;
    color: rgb(var(--c-danger));
    border-color: rgb(var(--c-danger) / 0.35);
}

.btn-danger:hover:not(:disabled) {
    background: rgb(var(--c-danger) / 0.1);
}

/* The recharge call-to-action. Outlined rather than filled so it never competes
   with the page's real primary action. */
.btn-topup {
    background: transparent;
    color: rgb(var(--c-warn));
    border-color: rgb(var(--c-warn) / 0.45);
}

.btn-topup:hover:not(:disabled) {
    background: rgb(var(--c-warn) / 0.1);
    border-color: rgb(var(--c-warn) / 0.7);
}

.btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
}

.btn-xl {
    padding: 0.9375rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
}

.btn-block {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */

.input,
.select,
.textarea {
    width: 100%;
    background: rgb(var(--c-sunken));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius);
    padding: 0.5625rem 0.75rem;
    font-size: 0.875rem;
    color: rgb(var(--c-ink));
    transition: border-color 0.15s;
}

.input::placeholder,
.textarea::placeholder {
    color: rgb(var(--c-ink-3));
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: rgb(var(--c-accent));
}

.textarea {
    resize: none;
    line-height: 1.7;
}

.select {
    appearance: none;
    padding-inline-end: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2371717a'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5'  stroke='%2371717a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    /* The shorthand has no logical form, so the RTL page flips it explicitly
       below rather than leaving the arrow stranded on the reading-end side. */
    background-position: right 0.5rem center;
    background-size: 1.125rem;
}

html[dir="rtl"] .select {
    background-position: left 0.5rem center;
}

.field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 550;
    color: rgb(var(--c-ink-2));
    margin-bottom: 0.375rem;
}

/* Radio / checkbox rendered as a selectable tile.
   Markup: <label class="choice"><input type="radio" class="choice-input"><span class="choice-body">…</span></label> */
.choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-body {
    display: block;
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-sunken));
    border-radius: var(--radius);
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    color: rgb(var(--c-ink-2));
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.choice-body:hover {
    border-color: rgb(var(--c-line-strong));
}

.choice-input:checked + .choice-body {
    border-color: rgb(var(--c-accent));
    color: rgb(var(--c-ink));
    background: rgb(var(--c-accent) / 0.07);
}

.choice-input:focus-visible + .choice-body {
    outline: 2px solid rgb(var(--c-accent));
    outline-offset: 2px;
}

/* Compact variant for pill rows */
.choice-pill {
    display: inline-block;
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-sunken));
    border-radius: 999px;
    padding: 0.3125rem 0.75rem;
    font-size: 0.75rem;
    color: rgb(var(--c-ink-2));
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.choice-pill:hover {
    border-color: rgb(var(--c-line-strong));
}

.choice-input:checked + .choice-pill {
    border-color: rgb(var(--c-accent));
    color: rgb(var(--c-accent));
    background: rgb(var(--c-accent) / 0.09);
}

/* Square scale cell, used by every 1-5 rating row */
.choice-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-sunken));
    border-radius: var(--radius);
    font-size: 0.8125rem;
    color: rgb(var(--c-ink-3));
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
    font-variant-numeric: tabular-nums;
}

.choice-cell:hover {
    border-color: rgb(var(--c-line-strong));
    color: rgb(var(--c-ink));
}

.choice-input:checked + .choice-cell {
    border-color: rgb(var(--c-accent));
    color: rgb(var(--c-accent));
    background: rgb(var(--c-accent) / 0.09);
    font-weight: 600;
}

/* Segmented control */
.seg {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    background: rgb(var(--c-sunken));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius);
}

.seg-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.4375rem 0.75rem;
    border-radius: 7px;
    font-size: 0.8125rem;
    font-weight: 550;
    color: rgb(var(--c-ink-3));
    cursor: pointer;
    border: 0;
    background: transparent;
    transition: background-color 0.15s, color 0.15s;
}

.seg-item:hover {
    color: rgb(var(--c-ink));
}

.seg-item[aria-selected="true"],
.choice-input:checked + .seg-item {
    background: rgb(var(--c-surface));
    color: rgb(var(--c-ink));
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.18);
}

/* --------------------------------------------------------------------------
   Voice picker
   --------------------------------------------------------------------------
   One selectable row per voice: index, avatar, name and accent, a preview
   link, and the per-conversion limit. Selection is a real radio input, so the
   whole list is keyboard- and screen-reader-navigable.
   -------------------------------------------------------------------------- */

.voice-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-block: 0.625rem;
    /* Extra room on the start side for the absolutely-positioned index badge. */
    padding-inline: 1.75rem 0.75rem;
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-sunken));
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.voice-row:hover {
    border-color: rgb(var(--c-line-strong));
}

.voice-row.is-selected {
    border-color: rgb(var(--c-accent));
    background: rgb(var(--c-accent) / 0.07);
}

.voice-index {
    position: absolute;
    top: 0.3125rem;
    inset-inline-start: 0.4375rem;
    font-size: 0.625rem;
    font-variant-numeric: tabular-nums;
    color: rgb(var(--c-ink-3));
    line-height: 1;
}

.voice-radio-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 1px solid rgb(var(--c-line-strong));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.voice-radio-dot::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgb(var(--c-accent));
    opacity: 0;
    transition: opacity 0.15s;
}

.voice-row.is-selected .voice-radio-dot {
    border-color: rgb(var(--c-accent));
}

.voice-row.is-selected .voice-radio-dot::after {
    opacity: 1;
}

/* Initial-based avatar: no image assets, still distinct per voice. */
.avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgb(var(--c-line));
    color: rgb(var(--c-ink-2));
    border: 1px solid rgb(var(--c-line-strong));
    user-select: none;
}

.voice-row.is-selected .avatar {
    background: rgb(var(--c-accent) / 0.15);
    border-color: rgb(var(--c-accent) / 0.4);
    color: rgb(var(--c-accent));
}

/* Inline text action, e.g. the per-voice "Example" preview. */
.link-action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 550;
    color: rgb(var(--c-accent));
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.link-action:hover {
    text-decoration: underline;
}

.link-quiet {
    color: rgb(var(--c-ink-3));
    font-size: 0.75rem;
    text-decoration: none;
}

.link-quiet:hover {
    color: rgb(var(--c-ink));
}

/* Scroll region for long lists, with the fade cue at the bottom edge. */
.scroll-list {
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* --------------------------------------------------------------------------
   Disclosure (More settings)
   -------------------------------------------------------------------------- */

details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker,
details > summary::marker {
    display: none;
    content: "";
}

details > summary:hover .chevron {
    color: rgb(var(--c-ink-2));
}

details[open] > summary .chevron {
    transform: rotate(180deg);
}

.chevron {
    transition: transform 0.15s ease;
}

/* --------------------------------------------------------------------------
   Dropdown menu (Insert pause)
   -------------------------------------------------------------------------- */

.menu-wrap {
    position: relative;
}

.menu {
    position: absolute;
    inset-inline-start: 0;
    top: calc(100% + 0.375rem);
    z-index: 30;
    min-width: 13rem;
    padding: 0.25rem;
    background: rgb(var(--c-surface));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgb(0 0 0 / 0.4);
    display: none;
}

/* The default anchors to the menu's own inline-start edge. A menu opened from
   a button hugging the far edge of the header needs the other edge instead,
   or it runs off the viewport. */
.menu-end {
    inset-inline-start: auto;
    inset-inline-end: 0;
}

.menu.is-open {
    display: block;
    animation: fade-in 0.12s ease-out;
}

.menu-head {
    padding: 0.5rem 0.5625rem 0.625rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid rgb(var(--c-line));
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.4375rem 0.5625rem;
    border: 0;
    background: none;
    border-radius: 7px;
    font-size: 0.8125rem;
    color: rgb(var(--c-ink-2));
    text-decoration: none;
    cursor: pointer;
    text-align: start;
}

.menu-item:hover {
    background: rgb(var(--c-sunken));
    color: rgb(var(--c-ink));
}

.menu-item.is-current {
    color: rgb(var(--c-ink));
}

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.4375rem;
    border-radius: 6px;
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-sunken));
    color: rgb(var(--c-ink-2));
    font-size: 0.6875rem;
    font-weight: 550;
    line-height: 1.2;
    white-space: nowrap;
}

.badge-accent {
    border-color: rgb(var(--c-accent) / 0.35);
    background: rgb(var(--c-accent) / 0.1);
    color: rgb(var(--c-accent));
}

.badge-danger {
    border-color: rgb(var(--c-danger) / 0.35);
    background: rgb(var(--c-danger) / 0.1);
    color: rgb(var(--c-danger));
}

.badge-warn {
    border-color: rgb(var(--c-warn) / 0.35);
    background: rgb(var(--c-warn) / 0.1);
    color: rgb(var(--c-warn));
}

.badge-solid {
    border-color: transparent;
    background: rgb(var(--c-accent));
    color: rgb(var(--c-on-accent));
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-lg);
    background: rgb(var(--c-surface));
}

table.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

table.tbl th {
    text-align: start;
    padding: 0.6875rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(var(--c-ink-3));
    background: rgb(var(--c-sunken));
    border-bottom: 1px solid rgb(var(--c-line));
    white-space: nowrap;
}

table.tbl td {
    padding: 0.6875rem 1rem;
    color: rgb(var(--c-ink-2));
    border-bottom: 1px solid rgb(var(--c-line) / 0.6);
}

table.tbl tbody tr:last-child td {
    border-bottom: 0;
}

table.tbl tbody tr:hover td {
    background: rgb(var(--c-sunken) / 0.5);
}

.num {
    text-align: right;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-variant-numeric: tabular-nums;
    color: rgb(var(--c-ink));
}

.empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: rgb(var(--c-ink-3));
    font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   Meters
   -------------------------------------------------------------------------- */

.meter {
    height: 4px;
    border-radius: 999px;
    background: rgb(var(--c-line));
    overflow: hidden;
}

.meter > span {
    display: block;
    height: 100%;
    background: rgb(var(--c-accent));
    border-radius: 999px;
}

.meter-neutral > span {
    background: rgb(var(--c-ink-3));
}

/* --------------------------------------------------------------------------
   Notices
   -------------------------------------------------------------------------- */

.notice {
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-surface));
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    color: rgb(var(--c-ink-2));
}

.notice-accent {
    border-color: rgb(var(--c-accent) / 0.3);
    background: rgb(var(--c-accent) / 0.06);
}

.notice-danger {
    border-color: rgb(var(--c-danger) / 0.3);
    background: rgb(var(--c-danger) / 0.06);
    color: rgb(var(--c-danger));
}

.notice-warn {
    border-color: rgb(var(--c-warn) / 0.3);
    background: rgb(var(--c-warn) / 0.06);
}

/* --------------------------------------------------------------------------
   Audio
   -------------------------------------------------------------------------- */

audio {
    width: 100%;
    height: 36px;
    border-radius: var(--radius);
}

/* The native player is built for light backgrounds; invert it back on dark. */
:root:not([data-theme="light"]) audio {
    filter: invert(92%) hue-rotate(180deg) saturate(0.2);
}

:root[data-theme="light"] audio {
    filter: none;
}

/* --------------------------------------------------------------------------
   Code
   -------------------------------------------------------------------------- */

code,
kbd {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.8125em;
}

.code-block {
    background: rgb(var(--c-sunken));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    overflow-x: auto;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.75rem;
    line-height: 1.7;
    color: rgb(var(--c-ink-2));
    white-space: pre;
    tab-size: 2;
}

.code-block .tok-key {
    color: rgb(var(--c-accent));
}

.code-block .tok-str {
    color: rgb(var(--c-ink));
}

.code-block .tok-com {
    color: rgb(var(--c-ink-3));
}

.code-inline {
    background: rgb(var(--c-sunken));
    border: 1px solid rgb(var(--c-line));
    border-radius: 5px;
    padding: 0.0625rem 0.3125rem;
    color: rgb(var(--c-ink));
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spinner {
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgb(var(--c-line-strong));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(var(--c-ink-3));
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgb(0 0 0 / 0.6);
    backdrop-filter: blur(2px);
}

.modal.is-open {
    display: flex;
}

.modal-panel {
    width: 100%;
    max-width: 30rem;
    max-height: 88vh;
    overflow-y: auto;
    background: rgb(var(--c-surface));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgb(0 0 0 / 0.35);
    animation: fade-in 0.2s ease-out;
}

/* ---------------------------------------------------------------------------
   Legal documents
   Long prose typed as plain HTML: the rhythm is set here once instead of
   hanging a utility class on every paragraph.
   --------------------------------------------------------------------------- */
.legal-doc h2 {
    font-size: 15px;
    font-weight: 600;
    color: rgb(var(--c-ink));
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.legal-doc h3 {
    font-size: 13.5px;
    font-weight: 600;
    color: rgb(var(--c-ink-2));
    margin-top: 1.1rem;
    margin-bottom: 0.35rem;
}

.legal-doc p,
.legal-doc li {
    font-size: 13.5px;
    line-height: 1.7;
    color: rgb(var(--c-ink-2));
}

.legal-doc p {
    margin-bottom: 0.75rem;
}

.legal-doc ul,
.legal-doc ol {
    margin: 0 0 0.9rem;
    margin-inline-start: 1.25rem;
    list-style: disc;
}

.legal-doc ol {
    list-style: decimal;
}

.legal-doc li {
    margin-bottom: 0.35rem;
}

.legal-doc a {
    color: rgb(var(--c-accent));
}

.legal-doc a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Layout shell, nav and footer links
   -------------------------------------------------------------------------- */

.shell {
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: 1rem;
}

@media (min-width: 640px) {
    .shell {
        padding-inline: 1.5rem;
    }
}

.skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    top: -3rem;
    z-index: 50;
    padding: 0.5rem 0.875rem;
    background: rgb(var(--c-accent));
    color: rgb(var(--c-on-accent));
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 600;
    transition: top 0.15s;
}

.skip-link:focus {
    top: 0.75rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 550;
    color: rgb(var(--c-ink-2));
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    color: rgb(var(--c-ink));
    background: rgb(var(--c-sunken));
}

.nav-link.is-current {
    color: rgb(var(--c-ink));
    background: rgb(var(--c-sunken));
}

.balance-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius);
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-sunken));
    font-size: 0.8125rem;
    text-decoration: none;
}

.initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: rgb(var(--c-accent) / 0.15);
    color: rgb(var(--c-accent));
    font-size: 0.75rem;
    font-weight: 700;
}

.footer-link {
    display: block;
    font-size: 0.8125rem;
    color: rgb(var(--c-ink-2));
    text-decoration: none;
}

.footer-link:hover {
    color: rgb(var(--c-ink));
}

.footer-link.is-current {
    color: rgb(var(--c-accent));
}

/* --------------------------------------------------------------------------
   Home page
   -------------------------------------------------------------------------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3125rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-sunken));
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(var(--c-ink-2));
}

.eyebrow .dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: rgb(var(--c-accent));
}

.display {
    font-size: 2rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: rgb(var(--c-ink));
}

@media (min-width: 640px) {
    .display {
        font-size: 2.5rem;
    }
}

.lede {
    font-size: 1rem;
    line-height: 1.6;
    color: rgb(var(--c-ink-2));
    max-width: 38rem;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.hero-panel {
    background: rgb(var(--c-surface));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-panel-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid rgb(var(--c-line));
    color: rgb(var(--c-ink-3));
    font-size: 0.75rem;
}

.wave {
    display: flex;
    align-items: flex-end;
    gap: 0.25rem;
    height: 3.5rem;
}

.wave span {
    flex: 1;
    min-height: 3px;
    border-radius: 999px;
    background: rgb(var(--c-accent) / 0.55);
}

.tile {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-surface));
}

.tile-value {
    font-size: 1.375rem;
    font-weight: 700;
    color: rgb(var(--c-ink));
}

.tile-label {
    font-size: 0.75rem;
    color: rgb(var(--c-ink-3));
}

.voice-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.375rem;
    padding: 1rem 0.75rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-surface));
}

.price-figure {
    font-size: 1.75rem;
    font-weight: 700;
    color: rgb(var(--c-ink));
}

.sample-panel {
    background: rgb(var(--c-sunken));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-lg);
    padding: 1.125rem 1.25rem;
    line-height: 1.9;
}

.faq {
    border-top: 1px solid rgb(var(--c-line));
}

.faq-item {
    border-bottom: 1px solid rgb(var(--c-line));
    padding: 0.875rem 0;
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    margin-top: 0.625rem;
}

.faq-mark {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: rgb(var(--c-ink-3));
    transition: transform 0.15s;
}

.faq-item[open] .faq-mark {
    transform: rotate(180deg);
}

.cta-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgb(var(--c-line));
    background: rgb(var(--c-surface));
}
