/* ============================================
   EasyFPL — The Scout's Desk
   Reads as a publication rather than a dashboard: one wide column, generous
   measure, real typographic hierarchy. Uses the shared theme tokens, so it
   works in both light and dark.
   ============================================ */

.sd-page { max-width: 1180px; margin: 0 auto; padding: var(--space-8) 24px var(--space-12); }

.sd-masthead { margin-bottom: var(--space-8); }
.sd-masthead-row { display: flex; align-items: center; gap: 12px; }
.sd-masthead h1 { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--text-primary); }
.sd-masthead-row .btn { margin-left: auto; }
.sd-standfirst { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--text-secondary); max-width: 62ch; }
.sd-datanote { margin-top: 8px; font-size: 11px; color: var(--text-muted); }

.sd-empty { padding: 48px 20px; text-align: center; color: var(--text-muted); font-size: 14px; }

/* ---------- featured ---------- */
.sd-featured {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 0;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    background: var(--surface-1);
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 22px;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.sd-featured:hover, .sd-featured:focus-visible { border-color: var(--color-primary); box-shadow: var(--shadow-md); transform: translateY(-2px); outline: none; }

/* No stock photography on a data site — a generated cover keeps it honest. */
.sd-featured-art {
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--color-primary) 38%, transparent), transparent 60%),
        linear-gradient(150deg, #0f2f22 0%, #14472a 55%, #0d2018 100%);
    min-height: 210px;
}

.sd-featured-glyph { font-size: 62px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.sd-featured-body { padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; }
.sd-featured-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; line-height: 1.25; color: var(--text-primary); margin: 8px 0 8px; }
.sd-featured-dek { font-size: 14px; line-height: 1.65; color: var(--text-secondary); max-width: 62ch; }

/* ---------- grid ---------- */
.sd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

.sd-card {
    display: flex; flex-direction: column; gap: 7px;
    padding: 16px 17px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    background: var(--surface-1);
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.sd-card:hover, .sd-card:focus-visible { border-color: var(--color-primary); box-shadow: var(--shadow-sm); transform: translateY(-2px); outline: none; }
.sd-card-top { display: flex; align-items: center; gap: 8px; }
.sd-card-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--text-primary); }
.sd-card-dek { font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); flex: 1; }

.sd-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sd-tag { font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-subtle); color: var(--text-secondary); white-space: nowrap; }
.sd-tag.primary { background: color-mix(in srgb, var(--color-primary) 14%, transparent); border-color: color-mix(in srgb, var(--color-primary) 34%, transparent); color: var(--color-primary); }
.sd-read { font-size: 10px; color: var(--text-muted); margin-left: auto; white-space: nowrap; }
.sd-meta { font-size: 10.5px; color: var(--text-muted); }

/* ---------- studio ---------- */
.sd-studio-wrap { margin-top: 28px; }
.sd-studio-toggle { padding: 7px 13px; border-radius: var(--radius-md); border: 1px solid var(--border-default); background: var(--surface-1); color: var(--text-muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.sd-studio-toggle:hover { border-color: var(--color-primary); color: var(--text-primary); }
.sd-studio { display: none; margin-top: 10px; padding: 15px 16px; border: 1px solid var(--border-default); border-radius: var(--radius-xl); background: var(--surface-1); }
.sd-studio.open { display: block; }
.sd-studio-note { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 11px; max-width: 70ch; }
.sd-gen-list { display: flex; flex-wrap: wrap; gap: 7px; }

.sd-gen-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 13px; border-radius: var(--radius-lg); border: 1px solid var(--border-default); background: var(--surface-2); cursor: pointer; text-align: left; }
.sd-gen-btn:hover { border-color: var(--color-primary); }
.sd-gen-label { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.sd-gen-cadence { font-size: 9.5px; color: var(--text-muted); }
.sd-gen-status { margin-top: 9px; font-size: 11px; color: var(--color-primary); min-height: 14px; }

/* ---------- reader ---------- */
.sd-reader { position: fixed; inset: 0; z-index: 2000; background: rgba(2, 8, 5, .55); backdrop-filter: blur(3px); display: none; }
.sd-reader.open { display: block; }
.sd-reader-panel { position: absolute; inset: 0; display: flex; justify-content: center; }
.sd-reader-scroll { width: 100%; overflow-y: auto; padding: 40px 20px 80px; }
.sd-reader-body { max-width: 760px; margin: 0 auto; background: var(--surface-1); border: 1px solid var(--border-default); border-radius: var(--radius-xl); padding: 34px 40px 40px; }

.sd-reader-close { position: fixed; top: 18px; right: 22px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-default); background: var(--surface-1); color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer; }
.sd-reader-close:hover { border-color: var(--color-primary); color: var(--text-primary); }

.sd-reader-title { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1.2; color: var(--text-primary); margin: 12px 0 10px; }
.sd-reader-dek { font-size: 16px; line-height: 1.65; color: var(--text-secondary); margin-bottom: 10px; }
.sd-reader-meta { font-size: 11px; color: var(--text-muted); padding-bottom: 18px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 20px; }

/* Long-form measure and rhythm — this is the bit that makes it read as writing. */
.sd-prose { font-size: 15.5px; line-height: 1.75; color: var(--text-secondary); }
.sd-prose h2 { font-family: var(--font-display); font-size: 21px; font-weight: 700; color: var(--text-primary); margin: 30px 0 10px; }
.sd-prose h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 22px 0 7px; }
.sd-prose p { margin-bottom: 15px; }
.sd-prose strong { color: var(--text-primary); font-weight: 700; }
.sd-prose code { font-family: var(--font-mono); font-size: 13px; padding: 1px 5px; border-radius: 4px; background: var(--surface-2); color: var(--text-primary); }
.sd-prose ul { margin: 0 0 15px 20px; }
.sd-prose li { margin-bottom: 7px; }

.sd-prose blockquote {
    margin: 20px 0;
    padding: 13px 17px;
    border-left: 3px solid var(--color-primary);
    background: var(--surface-2);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.sd-table-wrap { overflow-x: auto; margin: 18px 0; }
.sd-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sd-table th { text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); padding: 8px 10px; border-bottom: 1px solid var(--border-default); white-space: nowrap; }
.sd-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); white-space: nowrap; }
.sd-table td strong { color: var(--text-primary); font-family: var(--font-mono); }
.sd-table tbody tr:hover { background: var(--surface-2); }

.sd-reader-foot { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border-subtle); font-size: 11px; line-height: 1.6; color: var(--text-muted); }

@media (max-width: 820px) {
    .sd-featured { grid-template-columns: 1fr; }
    .sd-featured-art { min-height: 130px; }
    .sd-reader-body { padding: 24px 20px 30px; }
    .sd-reader-title { font-size: 25px; }
}

/* Cards are anchors so a crawler can follow them to the permalink; the click
   handler opens the reader for everyone else. */
.sd-featured, .sd-card { text-decoration: none; color: inherit; }
.sd-permalink { color: var(--color-primary); text-decoration: underline; }

/* Standalone article pages written by scripts/build-articles.js. No sidebar,
   no app shell — just the piece. */
.sd-standalone { max-width: 820px; margin: 0 auto; padding: 28px 20px 70px; }
.sd-crumb { margin-bottom: 16px; }
.sd-crumb a { font-size: 12px; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.sd-crumb a:hover { color: var(--color-primary); }
.sd-standalone .sd-reader-body { background: var(--surface-1); border: 1px solid var(--border-default); border-radius: var(--radius-xl); padding: 34px 40px 40px; }

@media (max-width: 820px) { .sd-standalone .sd-reader-body { padding: 24px 20px 30px; } }

/* ======================================================================
   Long-form article components
   Emitted by the ::: directives in scripts/scouts-desk.js. The renderer owns
   these tags; generators only supply text, which keeps the escape-before-parse
   guarantee intact while still producing structured markup.
   Uses shared theme tokens throughout, so both themes come for free.
   ====================================================================== */

/* ---------- callouts ---------- */
.scout-callout {
    margin: 22px 0;
    padding: 14px 18px;
    border-radius: var(--radius-lg, 12px);
    border-left: 3px solid var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 7%, var(--surface-2));
}
.scout-callout .callout-header {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 6px;
}
.scout-callout p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.65; color: var(--text-secondary); }
.scout-callout p:last-child { margin-bottom: 0; }
.scout-callout-warning { border-left-color: var(--color-warning); background: color-mix(in srgb, var(--color-warning) 7%, var(--surface-2)); }
.scout-callout-warning .callout-header { color: var(--color-warning); }
.scout-callout-data { border-left-color: var(--color-info); background: color-mix(in srgb, var(--color-info) 7%, var(--surface-2)); }
.scout-callout-data .callout-header { color: var(--color-info); }
.scout-callout-tactical { border-left-color: #A78BFA; background: color-mix(in srgb, #A78BFA 7%, var(--surface-2)); }
.scout-callout-tactical .callout-header { color: #A78BFA; }

/* ---------- the short version ---------- */
.article-takeaways {
    margin: 22px 0;
    padding: 16px 20px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg, 12px);
    background: var(--surface-2);
}
.article-takeaways .callout-header {
    font-family: var(--font-display);
    font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 9px;
}
.article-takeaways ul { margin: 0 0 0 18px; }
.article-takeaways li { margin-bottom: 6px; font-size: 14.5px; line-height: 1.6; color: var(--text-secondary); }
.article-takeaways li:last-child { margin-bottom: 0; }

/* ---------- buy / hold / sell ---------- */
.article-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
    margin: 20px 0;
}
.action-card {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 12px 14px;
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--border-default);
    border-left-width: 3px;
    background: var(--surface-2);
    font-size: 14px; line-height: 1.55;
    color: var(--text-secondary);
}
.action-card strong { color: var(--text-primary); font-weight: 700; }
.action-dot { flex-shrink: 0; font-size: 12px; line-height: 1.5; }
.action-why { display: block; margin-top: 3px; font-size: 13px; color: var(--text-muted); }
.action-buy  { border-left-color: var(--color-success); }
.action-hold { border-left-color: var(--color-warning); }
.action-sell { border-left-color: var(--color-error); }

/* ---------- difficulty pills ---------- */
.fdr-pill {
    display: inline-block;
    min-width: 30px;
    padding: 2px 7px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 11.5px; font-weight: 700;
    text-align: center;
    color: #0b0b0b;
}
.fdr-pill.fdr-1, .fixture-chip-strip.fdr-1 { background: #4ADE80; }
.fdr-pill.fdr-2, .fixture-chip-strip.fdr-2 { background: #86EFAC; }
.fdr-pill.fdr-3, .fixture-chip-strip.fdr-3 { background: #CBD5E1; }
.fdr-pill.fdr-4, .fixture-chip-strip.fdr-4 { background: #FB923C; }
.fdr-pill.fdr-5, .fixture-chip-strip.fdr-5 { background: #F87171; }

/* ---------- inline fixture run ---------- */
.article-fixture-strip {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 14px 0 18px;
}
.fixture-chip-strip {
    display: flex; flex-direction: column; align-items: center;
    min-width: 74px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12.5px; font-weight: 700;
    color: #0b0b0b;
}
.fixture-chip-strip small { font-size: 9px; font-weight: 600; opacity: .72; letter-spacing: .03em; }

/* Long matrices (six gameweeks across twenty teams) must scroll in their own
   box rather than pushing the page sideways. */
.sd-prose .article-table-wrapper { max-width: 100%; }
.sd-prose .article-data-table td { font-size: 12.5px; }

@media (max-width: 640px) {
    .article-action-grid { grid-template-columns: 1fr; }
    .fixture-chip-strip { min-width: 64px; }
}
