/* The feature pages (scripts/feature-pages.js), on the public shell: the
   same canvas, insets, hairlines, eyebrows and headings as the rest of the
   public site. Cards use 18px corners and pill links, per the web contract;
   motion is transform and opacity only, and none under reduced motion. */

.otf-fp-index,
.otf-fp-block,
.otf-fp-more {
    width: min(100%, var(--otf-canvas-max, 1440px));
    margin-inline: auto;
    padding-inline: var(--otf-inset, 16px);
}

/* ── /features: one card per part of the app ─────────────────────────── */
.otf-fp-index { padding-top: 8px; padding-bottom: 96px; }

/* Thirteen parts: a last card alone on its row takes the whole row, as the
   closing invitation, instead of sitting in one column of an empty row. */
.otf-fp-index ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.otf-fp-card {
    position: relative;
    display: grid;
    align-content: start;
    gap: 10px;
    height: 100%;
    min-height: 230px;
    padding: 24px 24px 64px;
    border: 1px solid var(--otf-public-line);
    border-radius: 18px;
    color: var(--otf-public-ivory);
    background: var(--otf-public-surface);
    text-decoration: none;
    transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), border-color 360ms ease, box-shadow 360ms ease;
}

.otf-fp-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 250, 240, 0.26);
    box-shadow: 0 24px 54px var(--otf-public-shadow);
}

.otf-fp-card:active { transform: scale(0.985); transition-duration: 100ms; }
.otf-fp-card:focus-visible { outline: 2px solid var(--otf-public-sand); outline-offset: 3px; }

.otf-fp-card-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 8px;
    border-radius: 14px;
    color: var(--otf-public-sand);
    background: var(--otf-public-surface-strong);
}

.otf-fp-card strong {
    font-family: var(--otf-heading);
    font-size: 21px;
    font-weight: 760;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.otf-fp-card-copy {
    color: var(--otf-public-muted);
    font-size: 15px;
    line-height: 1.55;
}

.otf-fp-card-go {
    position: absolute;
    left: 24px;
    bottom: 22px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--otf-public-ivory);
    background: rgba(255, 250, 240, 0.08);
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), background-color 280ms ease;
}

.otf-fp-card:hover .otf-fp-card-go { transform: translateX(4px); color: var(--otf-public-action-ink); background: var(--otf-public-action); }

/* ── A section: copy and facts beside a real screen ──────────────────── */
.otf-fp-block {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: clamp(40px, 6vw, 96px);
    padding-top: 96px;
    padding-bottom: 96px;
    border-top: 1px solid var(--otf-public-line);
}

.otf-fp-block.is-flipped .otf-fp-copy { order: 2; }
.otf-fp-block.is-wide { grid-template-columns: minmax(0, 1fr); }
.otf-fp-block.is-wide .otf-fp-copy { max-width: 1040px; }
.otf-fp-block.is-wide .otf-fp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }

.otf-fp-copy { min-width: 0; }

.otf-fp-copy h2 {
    margin: 0;
    color: var(--otf-public-ivory);
    font-family: var(--otf-heading);
    font-size: clamp(34px, 4.2vw, 58px);
    font-weight: 750;
    line-height: 1.04;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.otf-fp-lede {
    max-width: 62ch;
    margin: 18px 0 0;
    color: rgba(255, 250, 240, 0.86);
    font-size: 17px;
    line-height: 1.65;
}

.otf-fp-facts {
    display: grid;
    gap: 4px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.otf-fp-facts li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--otf-public-line);
}

.otf-fp-fact-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: var(--otf-public-sand);
    background: var(--otf-public-surface);
}

.otf-fp-facts strong {
    display: block;
    color: var(--otf-public-ivory);
    font-size: 16px;
    font-weight: 760;
    line-height: 1.3;
}

.otf-fp-facts p {
    max-width: 62ch;
    margin: 4px 0 0;
    color: var(--otf-public-muted);
    font-size: 15px;
    line-height: 1.55;
}

.otf-fp-chips { margin-top: 28px; }

.otf-fp-chips > p {
    margin: 0 0 12px;
    color: var(--otf-public-sand);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.otf-fp-chips ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.otf-fp-chips li {
    padding: 7px 14px;
    border: 1px solid var(--otf-public-line);
    border-radius: 999px;
    color: rgba(255, 250, 240, 0.86);
    background: rgba(255, 250, 240, 0.04);
    font-size: 13px;
    font-weight: 650;
}

.otf-fp-note {
    max-width: 62ch;
    margin: 24px 0 0;
    color: var(--otf-public-muted);
    font-size: 14px;
    line-height: 1.6;
}

.otf-fp-facts p a,
.otf-fp-note a,
.otf-fp-links a {
    color: var(--otf-public-sand);
    font-weight: 700;
    text-underline-offset: 3px;
}

.otf-fp-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.otf-fp-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--otf-public-line);
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.04);
    font-size: 14px;
    text-decoration: none;
}

.otf-fp-links a:hover { border-color: rgba(255, 250, 240, 0.28); }
.otf-fp-links a:focus-visible { outline: 2px solid var(--otf-public-sand); outline-offset: 3px; }

/* The phone turns a little as it scrolls into view, like For hosts' pass. */
.otf-fp-phone {
    --otf-phone-w: clamp(210px, 21vw, 280px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.otf-fp-phone .p3d {
    --p3d-rx: calc(6deg - var(--p, 1) * 3deg);
    --p3d-ry: calc(-24deg + var(--p, 1) * 34deg);
}

.otf-fp-block.is-flipped .otf-fp-phone .p3d { --p3d-ry: calc(24deg - var(--p, 1) * 34deg); }

/* ── The other pages, at the foot of each feature page ───────────────── */
.otf-fp-more {
    padding-top: 72px;
    padding-bottom: 24px;
    border-top: 1px solid var(--otf-public-line);
}

.otf-fp-more h2 {
    margin: 0 0 20px;
    color: var(--otf-public-sand);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.otf-fp-more ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.otf-fp-more-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--otf-public-line);
    border-radius: 999px;
    color: var(--otf-public-ivory);
    background: var(--otf-public-surface);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 200ms ease, transform 100ms ease;
}

.otf-fp-more-link i { color: var(--otf-public-sand); }
.otf-fp-more-link:hover { border-color: rgba(255, 250, 240, 0.28); }
.otf-fp-more-link:active { transform: scale(0.97); }
.otf-fp-more-link:focus-visible { outline: 2px solid var(--otf-public-sand); outline-offset: 3px; }

@media (min-width: 1101px) {
    .otf-fp-index li:last-child:nth-child(4n + 1) { grid-column: 1 / -1; }
}

@media (max-width: 1100px) {
    .otf-fp-index ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .otf-fp-index li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.otf-fp-index li:last-child .otf-fp-card { min-height: 0; }

@media (max-width: 900px) {
    .otf-fp-block,
    .otf-fp-block.is-flipped { grid-template-columns: minmax(0, 1fr); }
    .otf-fp-block.is-flipped .otf-fp-copy { order: 0; }
    .otf-fp-block.is-wide .otf-fp-facts { grid-template-columns: minmax(0, 1fr); }
    .otf-fp-phone { --otf-phone-w: min(62vw, 260px); }
}

@media (max-width: 767px) {
    .otf-fp-block { padding-top: 72px; padding-bottom: 72px; }
    .otf-fp-index { padding-bottom: 72px; }
    .otf-fp-index ul { grid-template-columns: minmax(0, 1fr); }
    .otf-fp-card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .otf-fp-card,
    .otf-fp-card-go,
    .otf-fp-more-link { transition: none; }
    .otf-fp-card:hover,
    .otf-fp-card:active,
    .otf-fp-more-link:active,
    .otf-fp-card:hover .otf-fp-card-go { transform: none; }
}

/* ── /sources: where the week's listings were posted, and each feed ────── */
.otf-sources-week,
.otf-sources-kind {
    width: min(100%, var(--otf-canvas-max, 1440px));
    margin-inline: auto;
    padding: 96px var(--otf-inset, 16px);
}

.otf-sources-kind { border-top: 1px solid var(--otf-public-line); }

/* One series, one hue: a sand bar per source, its count beside it in text
   ink, longest first. The list is its own table view. */
.otf-sources-bars {
    display: grid;
    gap: 2px;
    max-width: 920px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.otf-sources-bars > li {
    display: grid;
    grid-template-columns: minmax(130px, 220px) minmax(0, 1fr) 3.5ch;
    align-items: center;
    gap: 14px;
    min-height: 40px;
    padding: 4px 8px;
    border-radius: 10px;
    transition: background-color 200ms ease;
}

.otf-sources-bars > li:hover { background: color-mix(in srgb, var(--otf-public-ivory) 8%, transparent); }

.otf-sources-bar-label {
    color: var(--otf-public-ivory);
    font-size: 14px;
    font-weight: 700;
}

.otf-sources-bar {
    height: 14px;
    overflow: hidden;
    border-radius: 0 4px 4px 0;
}

.otf-sources-bar > span {
    display: block;
    width: calc(var(--share, 0) * 100%);
    min-width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
    background: var(--otf-public-sand);
    transform-origin: left center;
}

.otf-sources-bar-value {
    color: var(--otf-public-ivory);
    font-size: 15px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.otf-sources-bars > li.is-loading > span {
    grid-column: 1 / -1;
    height: 14px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--otf-public-ivory) 10%, transparent);
}

@media (prefers-reduced-motion: no-preference) {
    .otf-sources-bar > span { animation: otfBarGrow 900ms var(--otf-spring, ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
    @keyframes otfBarGrow { from { transform: scaleX(0); } }
}

.otf-sources-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
    gap: 18px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.otf-source {
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 22px;
    border: 1px solid var(--otf-public-line);
    border-radius: 18px;
    background: var(--otf-public-surface);
}

.otf-source-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 12px;
}

.otf-source-head strong {
    color: var(--otf-public-ivory);
    font-family: var(--otf-heading);
    font-size: 18px;
    font-weight: 780;
    letter-spacing: -0.01em;
}

.otf-source-head a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--otf-public-ivory) 30%, transparent); text-underline-offset: 3px; }
.otf-source-head a:hover { text-decoration-color: var(--otf-public-sand); }

.otf-source-cadence {
    color: var(--otf-public-sand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.otf-source > p {
    margin: 0;
    color: var(--otf-public-muted);
    font-size: 15px;
    line-height: 1.55;
}

.otf-source .otf-source-live {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--otf-public-line);
    color: var(--otf-public-ivory);
    font-size: 14px;
    font-weight: 650;
}

.otf-source-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--otf-public-muted);
    opacity: 0.6;
}

.otf-source.is-live .otf-source-dot { background: var(--otf-public-live); opacity: 1; box-shadow: 0 0 0 4px color-mix(in srgb, var(--otf-public-live) 22%, transparent); }

@media (max-width: 767px) {
    .otf-sources-week,
    .otf-sources-kind { padding-top: 72px; padding-bottom: 72px; }
    .otf-sources-bars > li { grid-template-columns: minmax(0, 1fr) 3.5ch; row-gap: 6px; }
    .otf-sources-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* A link inside running copy on the public pages. */
.otf-inline-link {
    color: var(--otf-public-sand);
    font-weight: 750;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}

.otf-inline-link:hover { color: var(--otf-public-ivory); }
