/* 2read.net. Colours, fonts and sizes come from the variables of the reading
   style that is switched on (styles/*.css), so the whole page changes with
   it. The files in styles/ are copies of what a saved article gets. */

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 1.5rem; }

.wrap {
    max-width: 72rem;
    margin-inline: auto;
    padding-inline: var(--side);
}

/* Headings outside article text. .title brings each style's own weight. */
.section-title {
    font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.7rem);
    line-height: 1.08;
}

/* Top */

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 1.25rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding: .15em .45em .15em .15em;
    border-radius: 2em;
    font-family: var(--head-font);
    font-size: 1.2em;
    font-weight: 700;
    text-decoration: none;
}
.brand img { display: block; }
.top-nav { display: flex; gap: 1.6em; font-size: .9em; }
.top-nav a { color: var(--soft); text-decoration: none; }
.top-nav a:hover, .top-nav a:focus-visible { color: var(--mark-ink); }

/* Hero */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
    padding-block: clamp(1.5rem, 5vw, 4rem) clamp(3.5rem, 8vw, 7rem);
}
.hero .title {
    font-size: clamp(2.7rem, 1.3rem + 5.4vw, 5.5rem);
    line-height: .98;
}
.hero-lede {
    max-width: 31em;
    margin: 1.5em 0 0;
    font-size: 1.1em;
    line-height: 1.5;
}
.hero-note { margin: 1em 0 0; color: var(--soft); font-size: .9em; }
.hero-fact {
    max-width: 27em;
    margin: 2.4em 0 0;
    padding-inline-start: 1em;
    border-inline-start: 3px solid var(--mark);
    color: var(--soft);
    font-size: .9em;
    line-height: 1.45;
}

/* Install buttons. The first one is the visitor's browser. */

.install { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2em 0 0; }
.button {
    padding: .8em 1.4em;
    border: 2px solid var(--ink);
    border-radius: 4px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}
.button:visited { text-decoration: none; }
.install .button:first-child {
    border-color: var(--mark-ink);
    background: var(--mark);
    color: var(--mark-ink);
}
.install .button:first-child:hover,
.install .button:first-child:focus-visible {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
}

/* Before and after */

.show {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
}
.show figure { grid-row: 1; margin: 0; }
.show figcaption { color: var(--soft); font-size: .8em; line-height: 1.3; }
.found { grid-column: 1 / 9; }
.found figcaption { margin-bottom: .6em; }
.kept { grid-column: 6 / 13; z-index: 1; margin-top: 4.75rem; }
.kept figcaption { margin-top: .75em; text-align: end; }

.found-page {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    padding: .9em;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--wash);
    color: var(--soft);
    font: 600 clamp(.4rem, .2rem + .5vw, .56rem)/1.2 system-ui, sans-serif;
}
.junk {
    display: grid;
    place-items: center;
    border: 1px dashed var(--soft);
    border-radius: 2px;
    background: repeating-linear-gradient(-45deg, transparent 0 .5em, var(--rule) .5em .62em);
    text-align: center;
}
.junk-banner { height: 4.4em; }
.junk-inline { height: 4.6em; margin: 1.1em 0; }
.junk-tall { height: 15em; }
.found-bar { display: flex; align-items: center; gap: .9em; margin: 1em 0 1.3em; }
.found-bar b { width: 6em; height: 1.5em; border-radius: 2px; background: var(--soft); }
.found-bar i { width: 3.2em; height: .5em; border-radius: 1em; background: var(--rule); }
.found-bar span { margin-inline-start: auto; padding: .4em .8em; border-radius: 2px; background: var(--soft); color: var(--wash); }
.found-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.4em; }
.found-title { margin: 0 0 .7em; color: var(--ink); font-size: 1.5em; line-height: 1.15; }
.found-label { margin: 1.3em 0 .7em; }
.lines {
    height: 7.2em;
    background: repeating-linear-gradient(to bottom, var(--rule) 0 .45em, transparent .45em 1.2em);
}
.found-cookies {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    align-items: center;
    gap: 1.2em;
    padding: 1em .9em;
    background: var(--ink);
    color: var(--paper);
}
.found-cookies b { padding: .4em .8em; border-radius: 2px; background: var(--paper); color: var(--ink); }

.kept-page {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5.3;
    padding: 1.7em 1.6em 0;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--paper);
    box-shadow: 0 1.4rem 2.6rem -1.2rem rgb(0 0 0 / .4);
    font-size: clamp(.5rem, .3rem + .52vw, .66rem);
}
.kept-page .title { margin: 0; font-size: 1.95em; }
.kept-page .source { margin-top: 1.2em; }
.kept-page .content { margin-top: 1.4em; }
.kept-page .content img { display: block; width: 100%; margin-bottom: 1.2em; }
.kept-page::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 4em;
    background: linear-gradient(to bottom, transparent, var(--paper));
}

/* One movement when the page opens: the clean copy comes out of the page. */
@media (prefers-reduced-motion: no-preference) {
    .kept { animation: lift .8s cubic-bezier(.2, .7, .2, 1) .2s both; }
    @keyframes lift {
        from { opacity: 0; transform: translate(-26%, -2.5rem) scale(.94); }
    }
}

/* Switches. They need the script, so they stay hidden without it. */

.switch { display: none; }
.js .switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .7rem 1.2rem;
    margin-top: 1.8rem;
}
.switch-say { margin: 0; color: var(--soft); font-size: .9em; line-height: 1.4; }
html:not(.js) .switch-say { display: none; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg button, .pick {
    border: 1px solid var(--rule);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    cursor: pointer;
}
.seg button { padding: .5em 1em .6em; font-size: .9em; line-height: 1.2; }
.seg button:hover, .pick:enabled:hover { border-color: var(--soft); }
.seg button[aria-pressed="true"],
.js .pick[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 -4px 0 var(--mark); }
.seg button:focus-visible, .pick:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* What you get */

.features { padding-block: clamp(1rem, 4vw, 3rem) clamp(3.5rem, 8vw, 7rem); }
.feature {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem clamp(2rem, 7vw, 6.5rem);
    align-items: center;
    margin-top: clamp(3.5rem, 7vw, 5.5rem);
}
.section-title + .feature { margin-top: clamp(2rem, 5vw, 3.5rem); }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature-text { max-width: 30em; }
.feature-text h3 { font-size: 1.55em; }
.feature-text .switch-say { font-size: 1em; color: inherit; }

.sorted { font-family: var(--head-font); }
.sorted-label { margin: 0 0 .6rem; color: var(--soft); font-family: var(--body-font); font-size: .85em; }
.sorted ul {
    display: flex;
    flex-wrap: wrap;
    gap: .45em .9em;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: clamp(1.15rem, .9rem + 1vw, 1.6rem);
    line-height: 1.25;
}
.sorted-gone { color: var(--soft); text-decoration: line-through; text-decoration-thickness: .08em; }
.sorted-gone + .sorted-label { margin-top: 2.2rem; }
.sorted-kept li { padding: 0 .3em; background: var(--mark); color: var(--mark-ink); }

.sheet {
    padding: clamp(1.2rem, 3.5vw, 2.4rem);
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: var(--paper);
}
.sheet.content figure { margin-top: 0; }
.sheet.content .formula { margin-bottom: 0; font-size: 1.25em; }

.picks { display: grid; gap: .6rem; }
.pick { display: block; width: 100%; padding: .95rem 1.2rem 1.15rem; text-align: start; }
.pick:disabled { cursor: default; }
.pick-name, .pick-says { display: block; }
.pick-says { margin-top: .3rem; color: var(--soft); font-size: .9rem; line-height: 1.4; }
/* Each one in its own face, whatever the page wears. Same stacks as styles/. */
.pick[data-style="serif"] {
    font-family: "Iowan Old Style", Charter, "Bitstream Charter", "Sitka Text", Cambria, "Noto Serif", "DejaVu Serif", Georgia, serif;
}
.pick[data-style="serif"] .pick-name { font-size: 2rem; font-weight: 400; line-height: 1.07; letter-spacing: -.012em; }
.pick[data-style="serif"] .pick-says { font-style: italic; }
.pick[data-style="sans"] {
    font-family: "Avenir Next", "Segoe UI Variable Text", "Segoe UI", Ubuntu, Roboto, "Noto Sans", system-ui, sans-serif;
}
.pick[data-style="sans"] .pick-name { font-size: 1.85rem; font-weight: 750; line-height: 1.08; letter-spacing: -.022em; }
.pick[data-style="compact"] {
    font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
}
.pick[data-style="compact"] .pick-name { font-size: 1.35rem; font-weight: 700; line-height: 1.2; letter-spacing: -.012em; }
.pick[data-style="compact"] .pick-says { font-size: .82rem; }
.js .picks .switch { margin-top: .6rem; }

.address-line {
    margin: 0;
    padding: .9em 1.1em;
    border-radius: .6em;
    background: var(--wash);
    font-family: var(--mono-font);
    font-size: .88em;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.address mark { padding: .1em .15em; background: var(--mark); color: var(--mark-ink); white-space: nowrap; }
.address-parts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem 2rem;
    margin: 1.6rem 0 0;
    padding-inline: 1.1em;
    font-size: .9em;
    line-height: 1.45;
}
.address-parts dt { font-family: var(--mono-font); font-size: .92em; }
.address-parts dd { margin: .5em 0 0; color: var(--soft); }

.pin.content pre { margin: 0; padding: 1.3em 1.5em; font-size: 1em; }
.pin.content .pin-note { margin: 1em 0 0; color: var(--soft); font-size: .9em; }

/* How it works */

.how { padding-block: clamp(3.5rem, 8vw, 6.5rem); background: var(--wash); }
.how-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
    gap: 2.5rem clamp(2rem, 7vw, 6.5rem);
    align-items: center;
}
.steps { max-width: 34em; margin: 2.4rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
    position: relative;
    padding: 1.15em 0 1.15em 3.4rem;
    border-top: 1px solid var(--rule);
    counter-increment: step;
    color: var(--soft);
}
.steps li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    top: .42em;
    color: var(--ink);
    font-family: var(--head-font);
    font-size: 2.3em;
    font-variant-numeric: lining-nums;
    line-height: 1.2;
}
.steps strong { display: block; color: var(--ink); font-size: 1.15em; font-weight: 600; line-height: 1.35; }
.popup { justify-self: center; }
.popup img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--rule);
    border-radius: 10px;
    box-shadow: 0 1.4rem 2.6rem -1.2rem rgb(0 0 0 / .4);
}

/* Questions */

.questions { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.faq {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.4rem clamp(2rem, 7vw, 6.5rem);
    margin: 2.6rem 0 0;
}
.faq dt { font-family: var(--head-font); font-size: 1.2em; font-weight: 600; line-height: 1.3; }
.faq dd { max-width: 32em; margin: .45em 0 0; }

/* Everything you save is public */

.public {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 1.5rem clamp(2rem, 7vw, 6.5rem);
    padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6.5rem);
}
.public::before {
    content: "";
    grid-column: 1 / -1;
    height: .5rem;
    margin-bottom: clamp(1rem, 3vw, 2.5rem);
    background: var(--mark);
}
.public .content { max-width: 34em; }

/* Last call, on the yellow of the icon */

.closing { padding-block: clamp(3.5rem, 9vw, 7rem); background: var(--mark); color: var(--mark-ink); }
.closing .title { max-width: 14em; font-size: clamp(2.1rem, 1.2rem + 3.8vw, 4rem); line-height: 1.02; }
.closing .button { border-color: var(--mark-ink); color: var(--mark-ink); }
.closing .install .button:first-child { background: var(--mark-ink); color: var(--mark); }
.closing .install .button:hover,
.closing .install .button:focus-visible {
    border-color: var(--mark-ink);
    background: #fff;
    color: var(--mark-ink);
}
.closing .button:focus-visible { outline-color: var(--mark-ink); }

.bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .4rem 2rem;
    padding-block: 2rem 3rem;
    color: var(--soft);
    font-size: .88em;
}
.bottom p { margin: 0; }

/* Narrow screens: one column, words before pictures. */

@media (max-width: 54rem) {
    .hero, .feature, .how-grid, .faq, .public { grid-template-columns: minmax(0, 1fr); }
    .feature:nth-of-type(even) .feature-text { order: 0; }
    .hero-show { max-width: 34rem; }
    .found-page { font-size: clamp(.34rem, 1.45vw, .56rem); }
    .kept-page { font-size: clamp(.42rem, 1.75vw, .66rem); }
    .kept { margin-top: 12%; }
    .popup { justify-self: start; }
}
@media (max-width: 36rem) {
    .top-nav { display: none; }
    .address-parts { grid-template-columns: minmax(0, 1fr); }
    .install .button { flex: 1 1 auto; text-align: center; }
}

@media print {
    .switch, .top-nav { display: none; }
    .closing, .how { background: none; }
}
