/* ==========================================================================
   Design 59 — "Fältrapport" (field report)
   NOT a homepage skin. This is the separate story page the review notes
   asked for: "12: Don't like as main page, but the story can be a
   separate new page."

   Editorial long-form built from design 12's field-report layout and
   design 26's dossier furniture — self-hosted IBM Plex Serif for running
   copy, a measured single column, numbered figures with captions, margin
   notes set in mono, and one hand-drawn diagram borrowed from design 20
   where a sketch genuinely reads better than a rendering.

   Scoped to /story via Pages/Story.razor <HeadContent>.
   ========================================================================== */

@font-face {
    font-family: 'IBM Plex Serif';
    src: url('/fonts/IBM-Plex/IBM-Plex-Serif/IBMPlexSerif-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Serif';
    src: url('/fonts/IBM-Plex/IBM-Plex-Serif/IBMPlexSerif-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'IBM Plex Serif';
    src: url('/fonts/IBM-Plex/IBM-Plex-Serif/IBMPlexSerif-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --fr-paper: #fbfaf7;
    --fr-paper-2: #f2efe8;
    --fr-ink: #1b1a17;
    --fr-ink-soft: #4a4740;
    --fr-muted: #7d7970;
    --fr-rule: #d9d5cb;
    --fr-blue: #008FBF;
    --fr-blue-deep: #045871;
    --fr-yellow: #FEC601;
    --fr-green: #93C48B;
    --fr-red: #b3452f;
    --fr-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
    --fr-sans: 'IBM Plex Sans', Helvetica, Arial, sans-serif;
    --fr-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

body {
    background: var(--fr-paper);
    color: var(--fr-ink);
    font-family: var(--fr-serif);
}

/* --------------------------------------------------------------------
   Header — a masthead rule
   -------------------------------------------------------------------- */
.header.yes {
    background: var(--fr-paper) !important;
    background-image: none !important;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--fr-rule);
}

/* style.css gives the logo 100px of air under the fixed menu bar; less on desktop (phones already use 24px) */
@media (min-width: 1024px) {
    .header.yes .header-text { margin-top: 48px; }
}

.header.yes .header-text h1,
.header.yes .header-text p { color: var(--fr-ink); }
.header.yes .header-text p strong { color: var(--fr-blue-deep); }

.header.yes .menu-bar ul li a {
    color: var(--fr-ink-soft);
    font-family: var(--fr-sans);
    font-size: 0.9rem;
}

.header.yes .menu-bar ul li a:hover { color: var(--fr-blue-deep); }

/* --------------------------------------------------------------------
   Measure
   -------------------------------------------------------------------- */
.fr-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Article column plus a margin rail for notes */
.fr-body {
    display: grid;
    grid-template-columns: minmax(0, 66ch) 220px;
    gap: 48px;
    align-items: start;
}

.fr-col { min-width: 0; }

/* --------------------------------------------------------------------
   Masthead of the piece
   -------------------------------------------------------------------- */
.fr-masthead {
    padding: 56px 0 40px;
    border-bottom: 2px solid var(--fr-ink);
    margin-bottom: 44px;
}

.fr-kicker {
    font-family: var(--fr-mono);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fr-red);
    margin-bottom: 20px;
}

.fr-headline {
    font-family: var(--fr-serif);
    font-size: clamp(2.1rem, 5.6vw, 3.6rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
    max-width: 18ch;
}

.fr-standfirst {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.62;
    color: var(--fr-ink-soft);
    font-style: italic;
    max-width: 52ch;
    margin: 0 0 28px;
}

.fr-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    font-family: var(--fr-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fr-muted);
}

/* --------------------------------------------------------------------
   Running copy
   -------------------------------------------------------------------- */
.fr-col p {
    font-size: 1.06rem;
    line-height: 1.78;
    margin: 0 0 22px;
    color: var(--fr-ink);
}

.fr-col p.fr-lead::first-letter {
    float: left;
    font-size: 4.1rem;
    line-height: 0.82;
    padding: 6px 10px 0 0;
    font-weight: 600;
    color: var(--fr-blue-deep);
}

.fr-h2 {
    font-family: var(--fr-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--fr-muted);
    margin: 46px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--fr-rule);
}

.fr-h2:first-child { margin-top: 0; }

.fr-pull {
    margin: 38px 0;
    padding: 0 0 0 24px;
    border-left: 3px solid var(--fr-yellow);
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    line-height: 1.46;
    font-style: italic;
    color: var(--fr-ink);
}

.fr-pull cite {
    display: block;
    margin-top: 12px;
    font-family: var(--fr-mono);
    font-size: 0.7rem;
    font-style: normal;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fr-muted);
}

/* --------------------------------------------------------------------
   Margin notes
   -------------------------------------------------------------------- */
.fr-rail {
    position: sticky;
    top: 94px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.fr-note {
    font-family: var(--fr-mono);
    font-size: 0.74rem;
    line-height: 1.62;
    color: var(--fr-muted);
    padding-left: 14px;
    border-left: 2px solid var(--fr-rule);
}

.fr-note strong {
    display: block;
    color: var(--fr-ink);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.68rem;
    margin-bottom: 7px;
}

/* --------------------------------------------------------------------
   Figures
   -------------------------------------------------------------------- */
.fr-figure {
    margin: 38px 0;
}

.fr-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--fr-rule);
}

.fr-figure figcaption {
    margin-top: 12px;
    font-family: var(--fr-mono);
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--fr-muted);
    padding-top: 9px;
    border-top: 1px solid var(--fr-rule);
}

.fr-figure figcaption b {
    color: var(--fr-ink);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Full-bleed photo break */
.fr-break {
    margin: 60px 0;
    background: var(--fr-paper-2);
    border-top: 1px solid var(--fr-rule);
    border-bottom: 1px solid var(--fr-rule);
    padding: 44px 0;
}

.fr-break-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.fr-break img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--fr-rule);
}

/* Hand-drawn sketch (design 20) — used once, where a sketch reads better */
.fr-sketch svg { display: block; width: 100%; height: auto; }

.fr-sketch-line {
    fill: none;
    stroke: var(--fr-ink);
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fr-sketch-flow {
    fill: none;
    stroke: var(--fr-blue);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-dasharray: 3 12;
    animation: fr-flow 1.6s linear infinite;
}

@keyframes fr-flow { to { stroke-dashoffset: -15; } }

@media (prefers-reduced-motion: reduce) {
    .fr-sketch-flow { animation: none; }
}

.fr-sketch-label {
    font-family: var(--fr-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    fill: var(--fr-ink-soft);
    text-anchor: middle;
}

/* --------------------------------------------------------------------
   Timeline of the shift
   -------------------------------------------------------------------- */
.fr-log {
    margin: 34px 0;
    border-top: 1px solid var(--fr-rule);
}

.fr-log-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--fr-rule);
}

.fr-log-time {
    font-family: var(--fr-mono);
    font-size: 0.76rem;
    color: var(--fr-blue-deep);
    letter-spacing: 0.04em;
    padding-top: 2px;
}

.fr-log-text {
    font-size: 0.98rem;
    line-height: 1.62;
    color: var(--fr-ink-soft);
}

.fr-log-row--mark .fr-log-text { color: var(--fr-ink); font-weight: 600; }
.fr-log-row--mark .fr-log-time { color: var(--fr-red); }

/* --------------------------------------------------------------------
   Closing CTA back to the product
   -------------------------------------------------------------------- */
.fr-outro {
    margin: 64px 0 0;
    padding: 40px 0 72px;
    border-top: 2px solid var(--fr-ink);
}

.fr-outro-title {
    font-family: var(--fr-serif);
    font-size: clamp(1.5rem, 3.2vw, 2.1rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0 0 14px;
}

.fr-outro-copy {
    font-size: 1.02rem;
    line-height: 1.72;
    color: var(--fr-ink-soft);
    max-width: 56ch;
    margin: 0 0 28px;
}

.fr-outro-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.fr-btn-primary.mud-button-root {
    background: var(--fr-blue-deep) !important;
    color: #fff !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    text-transform: none !important;
    font-family: var(--fr-sans) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    padding: 11px 26px !important;
}

.fr-btn-primary.mud-button-root:hover { background: var(--fr-blue) !important; }

.fr-btn-secondary.mud-button-root {
    background: transparent !important;
    color: var(--fr-ink) !important;
    border: 1px solid var(--fr-ink) !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    text-transform: none !important;
    font-family: var(--fr-sans) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    padding: 10px 26px !important;
}

.fr-btn-secondary.mud-button-root:hover { background: var(--fr-paper-2) !important; }

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
.footer-section {
    background: var(--fr-paper-2);
    border-top: 1px solid var(--fr-rule);
    padding-bottom: 44px;
}

/* The company line, the services and the address keep the live site's typography from style.css (IBM Plex Sans
   bold capitals, IBM Plex Mono capitals, Plex Sans e-mail), the same on every page. */

/* --------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------- */
@media (max-width: 980px) {
    .fr-body { grid-template-columns: 1fr; gap: 34px; }

    .fr-rail {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 22px;
    }

    .fr-note { flex: 1 1 240px; }
}

@media (max-width: 600px) {
    .fr-masthead { padding: 36px 0 28px; margin-bottom: 32px; }
    .fr-col p.fr-lead::first-letter { font-size: 3.2rem; }
    .fr-log-row { grid-template-columns: 68px 1fr; gap: 12px; }
}

/* --------------------------------------------------------------------
   Sticky header surface
   style.css switches .topHeader to position:fixed with a translucent
   white background once the page scrolls, and forces the nav links to
   #333 !important. Left alone that smears page content through the bar.
   Restate it in this design's own colours.
   -------------------------------------------------------------------- */
.header.yes .topHeader.topsticky {
    background: #fbfaf7;
    border-bottom: 1px solid #d9d5cb;
}

.header.yes .topHeader.topsticky .menu-bar ul li a,
.header.yes .topHeader.topsticky .btn-login,
.header.yes .topHeader.topsticky .mobile-nav span,
.header.yes .topHeader.topsticky .mobile-nav p {
    color: #1b1a17 !important;
}

.header.yes .topHeader.topsticky .btn-login {
    border-color: #1b1a17;
}
