/* ivkoroni.github.io: set like Radion's Newspaper style. Paper stock, true ink,
   one signal colour, hairline rules. Follows the reader's light or dark setting. */

:root {
    --canvas: #FAF9F6;
    --panel: #F1EFE9;
    --ink: #101014;
    --ink-muted: #66666E;
    --ink-faint: #A2A2AA;
    --rule: rgba(16, 16, 20, 0.11);
    --rule-strong: rgba(16, 16, 20, 0.22);
    --signal: #D8410A;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --canvas: #0A0A0B;
        --panel: #1F1F24;
        --ink: #F4F4F6;
        --ink-muted: #93939B;
        --ink-faint: #5A5A62;
        --rule: rgba(244, 244, 246, 0.11);
        --rule-strong: rgba(244, 244, 246, 0.20);
        --signal: #FF5A1F;
    }
}

/* Ferron's pages are always dark, like the app, with Ferron red as the
   signal colour. Add class="always-dark" to a page's <html> to use it. */
:root.always-dark {
    --canvas: #0A0A0B;
    --panel: #1F1F24;
    --ink: #F4F4F6;
    --ink-muted: #93939B;
    --ink-faint: #5A5A62;
    --rule: rgba(244, 244, 246, 0.11);
    --rule-strong: rgba(244, 244, 246, 0.20);
    --signal: #E8473A;
    color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

.page {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 22px 72px;
}

/* Masthead */

/* Top bar on app pages: a small IV Koroni name that leads back to the landing page. */
.topbar {
    margin: -16px 0 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rule);
}

.home-link {
    color: var(--ink);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.home-link:hover { color: var(--signal); }

.masthead {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 2px solid var(--rule-strong);
}

.mark {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    flex: none;
}

.masthead a { color: inherit; text-decoration: none; }

.masthead-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.masthead-sub {
    color: var(--ink-muted);
    font-size: 14px;
}

nav.sections {
    display: flex;
    gap: 22px;
    padding: 12px 0 0;
}

nav.sections a {
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
}

nav.sections a[aria-current="page"] { color: var(--signal); }

/* Type */

.overline {
    display: block;
    margin: 44px 0 6px;
    color: var(--signal);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 10px;
    font-size: clamp(32px, 6vw, 44px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

.lede {
    margin: 0 0 8px;
    color: var(--ink-muted);
    font-size: 19px;
}

.dateline {
    color: var(--ink-faint);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

h2 {
    margin: 44px 0 10px;
    padding-top: 18px;
    border-top: 1px solid var(--rule);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

h3 {
    margin: 26px 0 6px;
    font-size: 17px;
    font-weight: 700;
}

p, ul, ol { margin: 0 0 14px; }

ul, ol { padding-left: 22px; }

li { margin-bottom: 6px; }

a { color: var(--signal); }

strong { font-weight: 650; }

/* Pieces */

.card {
    margin: 22px 0;
    padding: 20px 22px;
    background: var(--panel);
    border-radius: 12px;
}

.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.contact-email {
    display: inline-block;
    margin-top: 4px;
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.summary {
    list-style: none;
    padding: 0;
}

.summary li {
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
    margin: 0;
}

.summary li:last-child { border-bottom: none; }

table {
    width: 100%;
    margin: 14px 0 18px;
    border-collapse: collapse;
    font-size: 15px;
}

th, td {
    padding: 10px 10px 10px 0;
    border-bottom: 1px solid var(--rule);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

details {
    border-bottom: 1px solid var(--rule);
}

details summary {
    cursor: pointer;
    padding: 14px 0;
    font-weight: 650;
    list-style: none;
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
    content: "+";
    float: right;
    color: var(--ink-faint);
    font-weight: 400;
    transition: transform 0.2s ease;
}

details[open] summary::after { transform: rotate(45deg); }

details > *:not(summary) { margin-top: 0; }

details > p:last-child, details > ul:last-child { padding-bottom: 8px; }

footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 60px;
    padding-top: 16px;
    border-top: 2px solid var(--rule-strong);
    color: var(--ink-faint);
    font-size: 13px;
}

footer a { color: var(--ink-muted); }

a:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Landing page: the studio wordmark, then a shelf of apps.
   Add an app by copying one <li class="app"> block in index.html. */

.home-head {
    padding-bottom: 22px;
    border-bottom: 2px solid var(--rule-strong);
}

.wordmark {
    margin: 0;
    font-size: clamp(56px, 14vw, 104px);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 0.92;
}

.wordmark a { color: inherit; text-decoration: none; }

.home-sub {
    margin: 12px 0 0;
    color: var(--ink-muted);
    font-size: 17px;
}

.shelf-title {
    margin: 40px 0 0;
    padding: 0;
    border: 0;
    color: var(--ink-muted);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
}

.shelf {
    list-style: none;
    margin: 0;
    padding: 0;
}

.app {
    position: relative;
    display: flex;
    gap: 22px;
    align-items: flex-start;
    margin: 0;
    padding: 26px 0;
    border-bottom: 1px solid var(--rule);
}

.app:last-child { border-bottom: 0; }

.app picture { flex: none; }

.app-icon {
    display: block;
    width: 96px;
    height: 96px;
}

.app-body { min-width: 0; }

.app-name {
    margin: 2px 0 2px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* The app name's link covers the whole row, so the row is one big target.
   The buttons and links inside sit above it and stay clickable on their own. */
.app-name a { color: inherit; text-decoration: none; }
.app-name a::after { content: ""; position: absolute; inset: 0; }
.app:hover .app-name a { color: var(--signal); }

.app-tagline {
    margin: 0 0 2px;
    font-size: 18px;
}

.app-devices {
    margin: 0 0 16px;
    color: var(--ink-muted);
    font-size: 14px;
}

.app-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 20px;
    margin: 0;
    font-size: 15px;
}

.app-actions a { position: relative; z-index: 1; }

.store-button {
    display: inline-block;
    padding: 9px 16px;
    background: var(--ink);
    color: var(--canvas);
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
}

.store-button:hover { background: var(--signal); }

/* App icon shape. Apple's icons use a smooth, continuous curve (a superellipse),
   not plain rounded corners. Any image with class "app-icon" or "mark" gets it. */
.app-icon, .mark {
    border-radius: 0;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M100.00 50.00 L99.96 66.80 L99.83 72.14 L99.61 76.01 L99.31 79.12 L98.92 81.75 L98.44 84.05 L97.87 86.08 L97.20 87.89 L96.44 89.52 L95.58 91.00 L94.61 92.33 L93.53 93.53 L92.33 94.61 L91.00 95.58 L89.52 96.44 L87.89 97.20 L86.08 97.87 L84.05 98.44 L81.75 98.92 L79.12 99.31 L76.01 99.61 L72.14 99.83 L66.80 99.96 L50.00 100.00 L33.20 99.96 L27.86 99.83 L23.99 99.61 L20.88 99.31 L18.25 98.92 L15.95 98.44 L13.92 97.87 L12.11 97.20 L10.48 96.44 L9.00 95.58 L7.67 94.61 L6.47 93.53 L5.39 92.33 L4.42 91.00 L3.56 89.52 L2.80 87.89 L2.13 86.08 L1.56 84.05 L1.08 81.75 L0.69 79.12 L0.39 76.01 L0.17 72.14 L0.04 66.80 L0.00 50.00 L0.04 33.20 L0.17 27.86 L0.39 23.99 L0.69 20.88 L1.08 18.25 L1.56 15.95 L2.13 13.92 L2.80 12.11 L3.56 10.48 L4.42 9.00 L5.39 7.67 L6.47 6.47 L7.67 5.39 L9.00 4.42 L10.48 3.56 L12.11 2.80 L13.92 2.13 L15.95 1.56 L18.25 1.08 L20.88 0.69 L23.99 0.39 L27.86 0.17 L33.20 0.04 L50.00 0.00 L66.80 0.04 L72.14 0.17 L76.01 0.39 L79.12 0.69 L81.75 1.08 L84.05 1.56 L86.08 2.13 L87.89 2.80 L89.52 3.56 L91.00 4.42 L92.33 5.39 L93.53 6.47 L94.61 7.67 L95.58 9.00 L96.44 10.48 L97.20 12.11 L97.87 13.92 L98.44 15.95 L98.92 18.25 L99.31 20.88 L99.61 23.99 L99.83 27.86 L99.96 33.20Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M100.00 50.00 L99.96 66.80 L99.83 72.14 L99.61 76.01 L99.31 79.12 L98.92 81.75 L98.44 84.05 L97.87 86.08 L97.20 87.89 L96.44 89.52 L95.58 91.00 L94.61 92.33 L93.53 93.53 L92.33 94.61 L91.00 95.58 L89.52 96.44 L87.89 97.20 L86.08 97.87 L84.05 98.44 L81.75 98.92 L79.12 99.31 L76.01 99.61 L72.14 99.83 L66.80 99.96 L50.00 100.00 L33.20 99.96 L27.86 99.83 L23.99 99.61 L20.88 99.31 L18.25 98.92 L15.95 98.44 L13.92 97.87 L12.11 97.20 L10.48 96.44 L9.00 95.58 L7.67 94.61 L6.47 93.53 L5.39 92.33 L4.42 91.00 L3.56 89.52 L2.80 87.89 L2.13 86.08 L1.56 84.05 L1.08 81.75 L0.69 79.12 L0.39 76.01 L0.17 72.14 L0.04 66.80 L0.00 50.00 L0.04 33.20 L0.17 27.86 L0.39 23.99 L0.69 20.88 L1.08 18.25 L1.56 15.95 L2.13 13.92 L2.80 12.11 L3.56 10.48 L4.42 9.00 L5.39 7.67 L6.47 6.47 L7.67 5.39 L9.00 4.42 L10.48 3.56 L12.11 2.80 L13.92 2.13 L15.95 1.56 L18.25 1.08 L20.88 0.69 L23.99 0.39 L27.86 0.17 L33.20 0.04 L50.00 0.00 L66.80 0.04 L72.14 0.17 L76.01 0.39 L79.12 0.69 L81.75 1.08 L84.05 1.56 L86.08 2.13 L87.89 2.80 L89.52 3.56 L91.00 4.42 L92.33 5.39 L93.53 6.47 L94.61 7.67 L95.58 9.00 L96.44 10.48 L97.20 12.11 L97.87 13.92 L98.44 15.95 L98.92 18.25 L99.31 20.88 L99.61 23.99 L99.83 27.86 L99.96 33.20Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* A faint edge so light icons don't disappear into the light page. */
.app picture, .masthead picture {
    filter: drop-shadow(0 0 0.6px var(--rule-strong)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

@media (max-width: 520px) {
    body { font-size: 16px; }
    .page { padding-top: 32px; }
    table { font-size: 14px; }
    .app { gap: 16px; }
    .app-icon { width: 68px; height: 68px; }
    .app-name { font-size: 24px; }
}
