/* Unboring app shell. Photocopier grey, ink navy, one ultramarine, one signal yellow. One family: Archivo, whose
   width axis is the device: dull things are set narrow and small, the transformation is set wide and loud. */
:root { --paper: #e6e8ec; --ink: #1b2033; --ultra: #2f2bd8; --sun: #ffcf33; --grey: #6b7180; --rule: #c9cdd6; --white: #fbfbfc;
  --f: "Archivo", "Helvetica Neue", Arial, sans-serif; }
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); font: 400 18px/1.55 var(--f); font-stretch: 100%; }
a { color: var(--ultra); }
:focus-visible { outline: 3px solid var(--ultra); outline-offset: 3px; }

.bar { display: flex; justify-content: space-between; align-items: center; padding: 1rem clamp(1.1rem, 5vw, 4rem); position: relative; z-index: 5; }
.brand { font-weight: 900; font-stretch: 125%; font-size: 1.35rem; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
nav { display: flex; gap: 1.2rem; align-items: center; font-size: .95rem; }
nav a, nav button { color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; padding: 0; text-decoration: none; }
nav .who { color: var(--grey); }

main { padding: 0 clamp(1.1rem, 5vw, 4rem) 5rem; }
.hero, .compose, .lib, .how, .examples { max-width: 64rem; }

/* the device: dull line -> loud line */
.dull { font-family: "Times New Roman", Times, serif; font-size: 15px; color: var(--grey); margin: clamp(2rem, 9vh, 6rem) 0 .6rem; letter-spacing: 0; }
.loud { font-weight: 900; font-stretch: 125%; font-size: clamp(3.2rem, 11vw, 9.5rem); line-height: .86; letter-spacing: -0.035em; margin: 0; max-width: 11ch; }
.loud.small { font-size: clamp(2.4rem, 7vw, 5rem); }
@media (prefers-reduced-motion: no-preference) {
  .hero .loud { animation: unbore 1.1s cubic-bezier(.2,.9,.2,1) both .15s; }
  @keyframes unbore { from { font-stretch: 62%; font-weight: 400; letter-spacing: 0; opacity: .25; } to { font-stretch: 125%; font-weight: 900; letter-spacing: -0.035em; opacity: 1; } }
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.35rem); max-width: 34ch; margin: 1.6rem 0 2rem; }
.fine { color: var(--grey); font-size: .88rem; max-width: 52ch; }

.drop { display: grid; gap: .3rem; background: var(--ultra); color: var(--white); padding: 1.6rem 1.8rem; max-width: 34rem; cursor: pointer; border-radius: 6px; box-shadow: 8px 8px 0 var(--sun); transition: transform .15s, box-shadow .15s; }
.drop strong { font-size: 1.4rem; font-stretch: 112%; font-weight: 800; }
.drop span { font-size: .92rem; opacity: .9; }
.drop:hover, .drop.over { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--sun); }
.drop.busy { cursor: progress; opacity: .85; }

h2 { font-weight: 800; font-stretch: 112%; font-size: clamp(1.5rem, 2.6vw, 2.2rem); letter-spacing: -0.02em; margin: 0 0 1.2rem; }
.how { margin-top: clamp(4rem, 12vh, 8rem); }
.how ol { list-style: none; counter-reset: s; padding: 0; margin: 0 0 1.4rem; display: grid; gap: 1rem; max-width: 46rem; }
.how li { counter-increment: s; display: grid; grid-template-columns: 2.4rem 1fr; }
.how li::before { content: counter(s); font-weight: 900; font-stretch: 125%; font-size: 1.5rem; color: var(--ultra); }
.examples { margin-top: clamp(4rem, 12vh, 7rem); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1.4rem; }
.card { display: block; text-decoration: none; color: inherit; background: var(--white); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.card .art { aspect-ratio: 16 / 9; background: var(--ink) center / cover; }
.card .t { padding: .8rem 1rem 1rem; } .card .t strong { display: block; font-weight: 700; line-height: 1.25; }
.card .t span { color: var(--grey); font-size: .85rem; }
.card:hover { border-color: var(--ink); }

/* compose */
.styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .9rem; margin: 1.6rem 0; }
.sty { text-align: left; background: var(--white); border: 2px solid transparent; border-radius: 6px; padding: 0; cursor: pointer; font: inherit; color: inherit; overflow: hidden; }
.sty .sw { display: flex; height: 3.2rem; } .sty .sw i { flex: 1; }
.sty .nm { padding: .6rem .8rem 0; font-weight: 800; font-size: 1.1rem; }
.sty .bl { padding: .2rem .8rem .8rem; font-size: .85rem; color: var(--grey); line-height: 1.35; }
.sty[aria-checked="true"] { border-color: var(--ultra); box-shadow: 4px 4px 0 var(--sun); }
.more { margin: .5rem 0 1.5rem; max-width: 34rem; } .more summary { cursor: pointer; color: var(--grey); }
.more label { display: block; margin-top: .8rem; } .more label.row { display: flex; gap: .5rem; align-items: center; }
input:not([type]), input[type=text] { display: block; width: 100%; margin-top: .3rem; font: inherit; padding: .65rem .8rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--white); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1.2rem; }
button.primary { font: inherit; font-weight: 800; font-stretch: 112%; background: var(--ink); color: var(--white); border: 0; padding: .85rem 1.3rem; border-radius: 4px; cursor: pointer; }
button.primary:disabled { opacity: .5; cursor: progress; }
button.ghost { font: inherit; background: none; border: 0; color: var(--ink); text-decoration: underline; cursor: pointer; padding: .5rem 0; }
.err { color: #b3261e; font-weight: 600; max-width: 46ch; }

/* making: live progress */
.making { max-width: 46rem; margin-top: clamp(2rem, 9vh, 6rem); }
.stages { list-style: none; padding: 0; margin: 1.6rem 0; display: grid; gap: .55rem; }
.stages li { color: var(--grey); display: flex; gap: .7rem; align-items: baseline; }
.stages li.done { color: var(--ink); } .stages li.now { color: var(--ultra); font-weight: 700; }
.stages li::before { content: ""; width: .7rem; height: .7rem; border: 2px solid currentColor; border-radius: 50%; flex: none; transform: translateY(.05rem); }
.stages li.done::before { background: currentColor; }
@media (prefers-reduced-motion: no-preference) { .stages li.now::before { animation: pulse 1s ease-in-out infinite alternate; } @keyframes pulse { to { transform: translateY(.05rem) scale(1.35); } } }

/* library */
.lib { margin-top: 2rem; }
.lib .status { font-size: .8rem; color: var(--grey); }

/* owner bar above a story */
.ownerbar { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; justify-content: space-between; padding: .7rem clamp(1.1rem, 5vw, 4rem); background: var(--ink); color: var(--white); font-size: .92rem; }
.ownerbar .grp { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.ownerbar button, .ownerbar select { font: inherit; color: var(--white); background: none; border: 1px solid #ffffff55; border-radius: 4px; padding: .35rem .7rem; cursor: pointer; }
.ownerbar select option { color: var(--ink); }
.ownerbar .meta { color: #ffffffaa; }
body.reading main { padding: 0; } body.reading .bar { display: none; }

/* passkey sheet */
.sheet { position: fixed; inset: 0; background: #1b203399; display: grid; place-items: center; z-index: 60; padding: 1rem; }
.sheet-in { position: relative; background: var(--white); max-width: 30rem; width: 100%; padding: 2rem; border-radius: 8px; box-shadow: 10px 10px 0 var(--sun); }
.sheet-in h2 { font-size: 1.5rem; }
.sheet .close { position: absolute; top: .6rem; right: .8rem; font-size: 1.6rem; background: none; border: 0; cursor: pointer; color: var(--grey); }

/* Video panel: sits under the owner bar, in the app's own colours, not the story's. */
.film { background: var(--white); border-bottom: 1px solid var(--rule); padding: 1.2rem clamp(1.1rem, 5vw, 4rem) 1.6rem; }
.film-in { max-width: 46rem; }
.film-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.film h2 { margin: 0; font-size: 1.15rem; font-weight: 800; font-stretch: 110%; }
.film-x { font: inherit; background: none; border: 1px solid var(--rule); border-radius: 4px; padding: .3rem .7rem; cursor: pointer; color: var(--ink); }
.film-status { margin: .6rem 0; color: var(--ink); }
.film progress { width: 100%; height: .5rem; accent-color: var(--ultra); }
.film-out { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.film video { width: min(100%, 270px); aspect-ratio: 9 / 16; background: var(--ink); border-radius: 6px; }
.film-dl, .film-share { display: inline-block; font: 700 1rem var(--f); background: var(--ultra); color: var(--white); border: 0; border-radius: 4px; padding: .7rem 1.1rem; text-decoration: none; cursor: pointer; }
.film-share { background: var(--ink); }
