/* Desktop first. The look of the app window on mittio.app (user, 2026-12-04): night surface in every colour scheme, square corners, hairlines,
   small uppercase labels, mono for times and code, one orange (#F2541B) for the brand, today and New post; a lighter orange marks times and the open place.
   Motion: feedback and state only, transform and opacity, under 300 ms. */
@font-face { font-family: 'Cabinet Grotesk'; src: url('/fonts/cabinet-grotesk-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Cabinet Grotesk'; src: url('/fonts/cabinet-grotesk-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cabinet Grotesk'; src: url('/fonts/cabinet-grotesk-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Supreme'; src: url('/fonts/supreme-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Supreme'; src: url('/fonts/supreme-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Supreme'; src: url('/fonts/supreme-700.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
:root { color-scheme: dark; --side: #0C0D0F; --bg: #0C0D0F; --raise: #17191C; --fill: #17191C; --press: #202327; --ink: #ECEBE7; --dim: #AFB1B5; --faint: #868A90; --line: rgb(236 235 231 / .13); --line-2: rgb(236 235 231 / .28);
  --accent: #FF9466; --brand: #F2541B; --on-brand: #111214; --bad: #FF8F7A; --warn: #f0bd6a; --shadow: 0 40px 80px -32px rgb(0 0 0 / .7);
  --f-display: 'Cabinet Grotesk', 'Segoe UI', sans-serif; --f-body: 'Supreme', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif; --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overscroll-behavior: none; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 .9375rem/1.5 var(--f-body); -webkit-font-smoothing: antialiased; overflow-wrap: anywhere; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: var(--f-display); font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.25; text-wrap: balance; }
h2 { font-family: var(--f-display); font-size: 1.1875rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.35; }
h3, .label, main:not(.narrow) h2, .bar > h1, legend, label > span { font: 500 .6875rem/1.3 var(--f-body); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-variant-numeric: tabular-nums; }
.label.on { color: var(--accent); }
p { text-wrap: pretty; }
b, strong { font-weight: 600; }
a { color: inherit; text-underline-offset: .2em; text-decoration-color: var(--dim); }
.dim { color: var(--dim); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.time { color: var(--accent); font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.tag { flex: none; color: var(--dim); font: 400 .75rem/1.3 var(--f-mono); white-space: nowrap; }
.tag.failed { color: var(--bad); font-weight: 600; }
.tag.unknown { color: var(--warn); font-weight: 600; }
.tag.cancelled { text-decoration: line-through; }
.tag.draft { color: var(--accent); font-weight: 600; }
.text { white-space: pre-wrap; }
kbd { font: 500 .6875rem/1 var(--f-mono); padding: .1875rem .375rem; box-shadow: inset 0 0 0 1px var(--line-2); }
pre { margin: .75rem 0; white-space: pre-wrap; background: var(--fill); padding: .75rem .875rem; font: 400 .75rem/1.6 var(--f-mono); }

/* Controls */
input, select, textarea, button { font: inherit; color: inherit; }
button, summary, nav a { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
button { --edge: var(--line-2); min-height: 36px; padding: 0 .875rem; border: 0; background: none; box-shadow: inset 0 0 0 1px var(--edge); font-weight: 500; font-size: .8125rem; cursor: pointer; transition: transform 160ms var(--ease-out), box-shadow 200ms ease, background-color 200ms ease, opacity 200ms ease; }
button:active:not(:disabled) { transform: scale(.97); }
button.main { background: var(--ink); color: var(--bg); box-shadow: none; }
button.danger { color: var(--bad); }
button.quiet { color: var(--dim); min-width: 36px; padding: 0; font-size: 1.125rem; }
/* Buttons that are a line, a date or a link carry no outline. */
button:is(.quiet, .link, .line, .plain, .date, .event, .new, .qrow), .month button, #signout { box-shadow: none; }
button:disabled { opacity: .5; cursor: default; }
button kbd { margin-left: .5rem; }
@media (hover: hover) and (pointer: fine) {
  button:hover:not(:disabled) { --edge: var(--ink); }
  button.main:hover:not(:disabled) { opacity: .88; }
  button:is(.quiet, .date, .event):hover:not(:disabled) { background: var(--press); }
  nav a:hover { background: var(--fill); color: var(--ink); }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: block; margin: .75rem 0; }
label > span { display: block; margin-bottom: .375rem; }
label.check { display: flex; align-items: center; gap: .625rem; min-height: 34px; margin: 0; }
label.check > span { font: inherit; letter-spacing: 0; text-transform: none; color: inherit; margin: 0; min-width: 0; }
textarea { display: block; padding: .5rem .75rem; resize: vertical; min-height: 6rem; line-height: 1.45; }
input[type=file] { display: block; width: 100%; max-width: 100%; padding: .375rem 0; font-size: .875rem; }
input[type=file]::file-selector-button { font: inherit; font-weight: 500; min-height: 36px; margin-right: .75rem; padding: 0 .875rem; border: 0; background: none; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); font-size: .8125rem; cursor: pointer; }
.lines { white-space: pre-line; }
label.check input { width: 1.0625rem; height: 1.0625rem; flex: none; accent-color: var(--brand); margin: 0; }
input:not([type=checkbox], [type=radio], [type=file]), select, textarea { width: 100%; min-height: 40px; padding: .375rem .75rem; border: 0; border-bottom: 1px solid var(--line-2); background-color: var(--fill); caret-color: var(--accent); }
:is(input, select, textarea):focus-visible { outline: 0; border-bottom-color: var(--accent); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible, input[type=range]:focus-visible, input[type=file]:focus-visible { outline: 2px solid var(--accent); }
select { appearance: none; padding-right: 2.25rem; text-overflow: ellipsis; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23888' stroke-width='1.75'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right .75rem center; }
option { background: var(--raise); color: var(--ink); }
::placeholder { color: var(--dim); opacity: 1; }
fieldset { border: 0; padding: 0; margin: 1rem 0; min-width: 0; }
legend { padding: 0 0 .375rem; }
.wide { width: 100%; min-height: 40px; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.row:empty { display: none; }
.row.end { justify-content: flex-end; }
.group { display: flex; gap: .25rem; flex: none; }
details > summary { display: flex; align-items: center; gap: .625rem; min-height: 36px; cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary span { min-width: 0; }
details > summary::before { content: ""; flex: none; width: .4375rem; height: .4375rem; border: solid var(--dim); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); transition: transform 160ms var(--ease-out); }
details[open] > summary::before { transform: rotate(45deg); }
video { display: block; aspect-ratio: 9 / 16; background: #000; object-fit: contain; }
.empty { padding: 4rem 1rem; text-align: center; }
.empty p { margin-top: .25rem; }

/* Shell */
main { padding: 20px 22px 3rem; min-width: 0; }
main.narrow { max-width: 24rem; margin: 0 auto; min-height: 100dvh; padding: 2rem 1.5rem 6rem; display: flex; flex-direction: column; justify-content: center; }
main.narrow h1 { font-size: 1.75rem; margin-bottom: .75rem; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; min-height: 40px; padding-bottom: 10px; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line-2); }
.bar > h1 { margin-right: auto; }
.bar > p.label { margin-left: auto; }
.bar > .zone { font-size: .75rem; font-family: var(--f-mono); }
.measure { max-width: 58rem; }
section > h2 { margin: 2.25rem 0 .75rem; }
:is(.split > div, .measure) > section:first-child > h2 { margin-top: 0; }
.entry { display: flex; align-items: center; gap: 1.25rem; padding: .75rem 0; border-top: 1px solid var(--line); min-height: 60px; }
.entry > div:first-child { flex: 1; min-width: 0; }
.entry > button, .entry > .group { flex: none; }
.entry p { font-size: .875rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(20rem, 26rem); gap: 4rem; align-items: start; }
ul.log { list-style: none; margin: .5rem 0 0; padding: 0; font-size: .8125rem; }
ul.log li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) minmax(0, 12rem); gap: 1rem; padding: .25rem 0; }

/* A post */
article.post { display: grid; grid-template-columns: auto minmax(0, 36rem); gap: 2.25rem; align-items: start; }
article.post video { height: min(40rem, calc(100dvh - 9rem)); max-width: 24rem; }
article.post .head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .25rem; }
article.post h2 { font-size: 1.25rem; min-width: 0; }
article.post .who { margin-bottom: .25rem; }
article.post .time { font-size: 1.0625rem; font-weight: 500; margin-bottom: .5rem; }
article.post .time .dim { margin-left: .625rem; font-size: .875rem; font-weight: 400; }
article.post .row > .main { flex: 1 0 100%; min-height: 44px; }
/* The fade says that there is more; the padding keeps short texts and the end clear of it. */
article.post .text { margin-top: 1.25rem; max-height: 16rem; overflow: auto; overscroll-behavior: contain; padding-bottom: 1.5rem; mask-image: linear-gradient(#000 calc(100% - 1.5rem), transparent); }
.thumb { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; font-size: .875rem; }
.thumb img { width: 12rem; max-width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.thumb video, article.post .thumb video, dialog.post article.post .thumb video, .card .thumb video { width: 5.5rem; height: auto; max-width: 100%; margin: 0; }
article.post a { display: inline-block; margin-top: .75rem; }
dl { margin: .75rem 0 0; border-top: 1px solid var(--line); padding-top: .75rem; font-size: .875rem; }
dl > div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1rem; padding: .1875rem 0; }
dt { color: var(--dim); }
dd { margin: 0; }
button.line { display: block; width: 100%; padding: .5rem .75rem; text-align: left; background: none; font-weight: 400; }
button.line > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.line > b { overflow-wrap: anywhere; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.35; }
button.line > .dim, button.line > .tag { font-size: .8125rem; }
/* Moving through a list happens hundreds of times: no motion. */
button.line, .month button, td button { transition: none; }
:is(button.line, .month button, td button):active:not(:disabled) { transform: none; }
button.line[aria-current] { background: var(--fill); }
.card { border-top: 1px solid var(--line); padding: 1rem 0 1.25rem; }
.card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.card .head strong { min-width: 0; }
.card .time .dim { margin-left: .5rem; font-size: .875rem; }
.card video { height: min(20rem, 44svh); max-width: 100%; margin: .75rem 0; }
.card .text { max-height: 12rem; overflow: auto; margin: .5rem 0; }

/* Calendar and history */
.cal { display: contents; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
/* Drafts without a day of their own, above the month, only when there are any. */
.approval { margin-bottom: 1.25rem; padding: .875rem 1rem .5rem; background: color-mix(in srgb, var(--brand) 9%, var(--bg)); box-shadow: inset 3px 0 var(--brand); }
.approval > h2 { margin: 0 0 .125rem; font-size: 1rem; }
.approval > h2 .dim { font-weight: 500; }
.approval > p { font-size: .8125rem; margin-bottom: .25rem; }
.approval .lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); max-height: 13.5rem; overflow: auto; overscroll-behavior: contain; margin: 0 -.75rem; }
.legend { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-top: .5rem; font-size: .8125rem; }
.legend .needs::before { content: ""; display: inline-block; width: .625rem; height: .625rem; margin-right: .375rem; background: color-mix(in srgb, var(--brand) 22%, transparent); box-shadow: inset 2px 0 var(--brand); vertical-align: -.05em; }
.weekday { font-size: .8125rem; color: var(--dim); padding: .25rem .5rem; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { text-align: left; font-weight: 400; font-size: .8125rem; color: var(--dim); padding: .375rem 1rem .375rem 0; position: sticky; top: 0; background: var(--bg); }
td { border-top: 1px solid var(--line); padding: 0 1rem 0 0; height: 44px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td button.plain { display: block; width: 100%; padding: 0; text-align: left; background: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
th:nth-child(1) { width: 11.5rem; } th:nth-child(3) { width: 24%; } th:nth-child(4) { width: 9.5rem; } th:nth-child(5) { width: 7.5rem; }
@media (hover: hover) and (pointer: fine) { td button.plain:hover:not(:disabled) { background: none; text-decoration: underline; text-underline-offset: .2em; } button.line:hover:not(:disabled) { background: var(--fill); } }
.filters { display: flex; gap: .5rem; }
.filters label { margin: 0; width: 13rem; }
.sr, .filters label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (min-width: 900px) {
  /* The window of mittio.app: a bar across the top, the sidebar, the open section. */
  body.signed-in { display: grid; grid-template: 48px minmax(0, 1fr) / 15rem minmax(0, 1fr); height: 100dvh; overflow: hidden; }
  body.signed-in > header { grid-area: 1 / 1 / 2 / 3; display: flex; align-items: center; gap: 18px; padding: 0 18px; border-bottom: 1px solid var(--line); min-width: 0; }
  body.signed-in > main { grid-area: 2 / 2; overflow: auto; overscroll-behavior: contain; }
  /* A page that stands alone while signed in (an assistant asks to connect): the whole width, no sidebar. */
  body.signed-in:has(> main.narrow) { display: block; height: auto; overflow: visible; }
  body.signed-in:has(> main.narrow) > header { height: 48px; }
  body.signed-in > main.narrow { min-height: calc(100dvh - 48px); max-width: 28rem; padding: 3rem 1.5rem 4rem; overflow: visible; }
  .bar > .add.phone { display: none; }
  #crumb { color: var(--dim); white-space: nowrap; }
  #workspace, #who { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; }
  #workspace { margin-left: auto; font-weight: 500; }
  #who { color: var(--faint); }
  nav { grid-area: 2 / 1; display: flex; flex-direction: column; padding: 20px 18px; border-right: 1px solid var(--line); overflow: auto; }
  nav .new { display: flex; align-items: center; gap: 8px; flex: none; width: 100%; min-height: 40px; padding: 0 12px; margin-bottom: 18px; background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: .875rem; }
  nav a { display: flex; align-items: center; justify-content: space-between; flex: none; min-height: 34px; padding: 0 8px; margin: 0 -8px 2px; font-size: .875rem; color: var(--dim); text-decoration: none; transition: background-color 200ms ease, color 200ms ease; }
  nav a[aria-current] { background: var(--fill); color: var(--ink); box-shadow: inset 2px 0 0 var(--accent); }
  nav .label { margin: 24px 0 12px; }
  nav [data-count] { color: var(--accent); font: 400 .6875rem/1 var(--f-mono); font-variant-numeric: tabular-nums; }
  main.calendar { display: flex; flex-direction: column; padding-bottom: 1.75rem; }
  .board { flex: 1; min-height: 34rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem); gap: 2rem; }
  .board > div:first-child { display: flex; flex-direction: column; min-width: 0; }
  .board .month { flex: 1; }
  .board > aside { overflow: auto; padding-bottom: 1.5rem; mask-image: linear-gradient(#000 calc(100% - 1.5rem), transparent); }
  .board > aside h2 { margin: .125rem .75rem .5rem; }
  .board .month { grid-template-rows: auto; grid-auto-rows: minmax(6rem, 1fr); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .day, .blank { border: solid var(--line); border-width: 1px 0 0 1px; padding: .25rem; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .day[data-chosen] { background: var(--fill); }
  .day .date { align-self: flex-start; min-height: 24px; min-width: 24px; padding: 0 .375rem; background: none; font-weight: 400; font-size: .8125rem; font-variant-numeric: tabular-nums; }
  .day.today .date { background: var(--brand); color: var(--on-brand); font-weight: 600; }
  .day .event { min-height: 22px; padding: 0 .375rem; background: none; text-align: left; font-size: .8125rem; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .day .event b { color: var(--accent); font-variant-numeric: tabular-nums; }
  .day .event.failed, .day .event.failed b { color: var(--bad); }
  /* Needs approval: tinted, with the brand edge (the legend under the month says so in words). */
  .day .event.draft { background: color-mix(in srgb, var(--brand) 16%, transparent); box-shadow: inset 2px 0 var(--brand); }
  .day .event[aria-current] { outline: 2px solid var(--accent); outline-offset: -2px; }
  .day .event.more { color: var(--dim); }
}
@media (min-width: 900px) and (max-width: 1179px) { th:nth-child(1) { width: 10.5rem; } th:nth-child(3) { width: 21%; } th:nth-child(4) { width: 7.5rem; } th:nth-child(5) { width: 7rem; } article.post { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; } dialog.post article.post video { height: min(22rem, 42dvh); } .split { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; } .board { grid-template-columns: minmax(0, 1fr); } main.calendar { display: block; } }

/* Dialog: centred, so it grows from its middle; leaves faster than it comes. */
dialog { --fill: #202327; --press: #2A2D32; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); box-shadow: var(--shadow); padding: 1.5rem; width: min(27rem, calc(100vw - 2rem)); max-height: calc(100dvh - 4rem); overflow: auto; overscroll-behavior: contain; opacity: 0; transform: scale(.97); transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out), display 150ms allow-discrete, overlay 150ms allow-discrete; }
dialog[open] { opacity: 1; transform: none; transition-duration: 220ms; }
@starting-style { dialog[open] { opacity: 0; transform: scale(.97); } }
dialog::backdrop { background: rgb(0 0 0 / .45); opacity: 0; transition: opacity 150ms ease, display 150ms allow-discrete, overlay 150ms allow-discrete; }
dialog[open]::backdrop { opacity: 1; transition-duration: 220ms; }
@starting-style { dialog[open]::backdrop { opacity: 0; } }
dialog > h2 { margin-bottom: .5rem; }
dialog h3 { margin-top: 1.25rem; }
dialog.post { width: min(60rem, calc(100vw - 4rem)); }
/* Add video: the form in the dialog. Platform settings appear for the platforms that are ticked. */
dialog.compose { width: min(34rem, calc(100vw - 2rem)); }
dialog.compose form > .dim { margin-top: -.5rem; font-size: .8125rem; }
dialog.compose fieldset.platform { border-top: 1px solid var(--line); padding-top: .75rem; }
dialog.compose fieldset.platform > legend { font-family: var(--f-body); letter-spacing: 0; text-transform: none; display: flex; align-items: center; gap: .5rem; float: left; width: 100%; padding: 0; color: var(--ink); font-weight: 600; font-size: .875rem; }
dialog.compose fieldset.platform > legend + * { clear: both; }
dialog.compose .when .group { gap: 1.5rem; }
dialog.compose .when label { margin-bottom: .25rem; }
dialog.compose .bad:empty { display: none; }
/* The chosen video before it is sent: vertical, beside its length, size and warnings; then the cover. */
dialog.compose .preview { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; align-items: start; margin: .75rem 0 0; }
dialog.compose .preview video { width: 100%; max-height: 17rem; }
dialog.compose .preview .facts { font-weight: 600; font-variant-numeric: tabular-nums; }
dialog.compose .preview .warnings p { margin-top: .5rem; font-size: .8125rem; }
dialog.compose fieldset.cover { border-top: 1px solid var(--line); padding-top: .75rem; }
dialog.compose fieldset.cover .row { align-items: center; margin-top: .25rem; }
dialog.compose input[type=range] { width: 100%; min-height: 32px; padding: 0; background: none; accent-color: var(--brand); }
dialog.compose .chosen { display: flex; gap: .875rem; align-items: center; margin-top: .75rem; font-size: .875rem; }
dialog.compose .chosen canvas { flex: none; width: 5.5rem; height: auto; max-height: 10rem; object-fit: contain; background: #000; }
dialog.compose .chosen button.link { margin-top: .25rem; }
dialog.compose .cover-problem:empty { display: none; }
dialog.compose fieldset.platform > .note { margin-bottom: .5rem; font-size: .8125rem; }
.meter { margin-top: 1rem; }
.meter progress { display: block; width: 100%; height: 6px; margin-top: .375rem; border: 0; background: var(--fill); accent-color: var(--brand); appearance: none; overflow: hidden; }
.meter progress::-webkit-progress-bar { background: var(--fill); }
.meter progress::-webkit-progress-value { background: var(--brand); }
.meter progress::-moz-progress-bar { background: var(--brand); }
dialog.post > .quiet { position: absolute; top: .75rem; right: .75rem; }
dialog.post > .back { display: none; }
dialog.post article.post > div { padding-right: 2.5rem; }
dialog.post article.post video { height: min(34rem, calc(100dvh - 8rem)); }

#toasts { position: fixed; inset: auto 1.5rem 1.5rem auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible; list-style: none; width: min(24rem, calc(100vw - 2rem)); display: none; flex-direction: column; gap: .5rem; color: inherit; }
#toasts:popover-open { display: flex; }
#toasts li { display: flex; align-items: center; gap: .5rem; padding: .5rem .5rem .5rem 1rem; background: var(--raise); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); transition: opacity 400ms ease, transform 400ms ease; }
#toasts li > span { flex: 1; min-width: 0; padding: .25rem 0; }
#toasts li.error { color: var(--bad); }
#toasts li.leaving { opacity: 0; transform: translateY(40%); transition-duration: 200ms; }
@starting-style { #toasts li { opacity: 0; transform: translateY(100%); } }

/* Phone and narrow windows */
@media (max-width: 899px) {
  body { font-size: 1rem; padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
  header { display: flex; align-items: center; gap: .625rem; padding: calc(.75rem + env(safe-area-inset-top, 0px)) 1.25rem .5rem; font-size: .875rem; }
  header .brand > span { display: none; }
  header .brand .mark { height: 20px; }
  #workspace { margin-right: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #who { color: var(--dim); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main { padding: .75rem 1.25rem 2rem; }
  h1 { font-size: 1.75rem; }
  button, details > summary { min-height: 44px; }
  input:not([type=checkbox], [type=radio], [type=file]), select, textarea { font-size: 16px; min-height: 48px; }
  label.check { min-height: 44px; }
  /* Eight sections: the row scrolls sideways, and the open one is brought into sight. */
  nav { position: fixed; inset: auto 0 0; z-index: 1; display: flex; overflow-x: auto; scrollbar-width: none; overscroll-behavior: contain; background: var(--bg); border-top: 1px solid var(--line); padding: 0 .375rem env(safe-area-inset-bottom, 0px); }
  nav::-webkit-scrollbar { display: none; }
  nav .new, nav .label, #crumb { display: none; }
  nav a { display: flex; align-items: center; justify-content: center; flex: 1 0 auto; min-height: 56px; padding: 0 .875rem; font-size: .8125rem; color: var(--dim); text-decoration: none; white-space: nowrap; }
  nav a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: inset 0 2px var(--brand); }
  nav [data-count] { display: none; }
  .bar > .filters { width: 100%; }
  .filters label { width: auto; flex: 1; min-width: 0; }
  .card .row > .main { flex: 1 0 100%; min-height: 52px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .entry { flex-wrap: wrap; gap: .5rem 1rem; }
  .entry > div:first-child { flex-basis: 60%; }
  ul.log li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .month { gap: 2px; }
  .weekday { text-align: center; padding: 0; }
  .month button { padding: 0; min-height: 50px; background: none; font-weight: 400; line-height: 1.15; }
  .month button b { display: block; min-height: 1.15em; font-size: .75rem; color: var(--accent); }
  .month button.today { color: var(--accent); font-weight: 700; box-shadow: inset 0 -2px var(--brand); }
  .month button[aria-pressed=true] { background: var(--ink); color: var(--bg); }
  .month button[aria-pressed=true] b { color: inherit; }
  .bar > .add { flex: 1 0 100%; min-height: 48px; }
  .bar > .zone { margin-left: 0; }
  .month button.needs::after { content: ""; display: block; width: 6px; height: 6px; margin: 2px auto 0; background: var(--brand); }
  .month button[aria-pressed=true].needs::after { background: var(--bg); }
  .legend .needs::before { width: 6px; height: 6px; background: var(--brand); box-shadow: none; vertical-align: .1em; }
  .today-list > h2 { margin: 1.5rem 0 .25rem; }
  .today-list .line, .approval .line { padding: .625rem .75rem; }
  .today-list { margin: 0 -.75rem; }
  .today-list > h2, .today-list > p { padding: 0 .75rem; }
  #toasts { inset: auto 1rem calc(4.5rem + env(safe-area-inset-bottom, 0px)); width: auto; }
}
@media (max-width: 639px) {
  dialog, dialog.post, dialog.compose { width: 100%; max-width: none; max-height: 88dvh; margin: auto 0 0; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition-timing-function: var(--ease-drawer); opacity: 1; }
  dialog[open] { transition-duration: 300ms; }
  @starting-style { dialog[open] { transform: translateY(100%); opacity: 1; } }
  dialog .row > * { flex: 1; min-height: 48px; }
  dialog.compose .preview { grid-template-columns: minmax(0, 8.5rem) minmax(0, 1fr); gap: .75rem; }
  dialog.compose .preview video { max-height: 15rem; }
  dialog.compose fieldset.cover .row > span { flex: none; min-height: 0; }
  dialog article.post { grid-template-columns: minmax(0, 1fr); }
  /* An opened post takes the whole screen, with Back at the top. */
  dialog.post { max-height: 100dvh; height: 100dvh; padding-top: 0; }
  dialog.post > .back { display: block; position: sticky; top: 0; z-index: 1; margin: 0 -1.5rem .75rem; padding: calc(.5rem + env(safe-area-inset-top, 0px)) 1.25rem .5rem; background: var(--raise); border-bottom: 1px solid var(--line); }
  dialog.post > .back button { min-height: 44px; font-size: 1rem; text-decoration: none; color: var(--ink); font-weight: 500; }
  dialog.post > .quiet { display: none; }
  dialog.post article.post > div { padding-right: 0; }
  dialog.post article.post video { height: min(22rem, 40dvh); max-width: 100%; margin: 0 auto; }
}
/* Reduced motion: nothing moves; fades stay. */
@media (prefers-reduced-motion: reduce) {
  button, details > summary::before { transition-property: background-color; }
  button:active:not(:disabled) { transform: none; }
  dialog, dialog[open], #toasts li, #toasts li.leaving { transform: none; }
  dialog { opacity: 0; }
  dialog[open] { opacity: 1; }
  @starting-style { dialog[open] { transform: none; opacity: 0; } #toasts li { transform: none; } }
}

/* Brand: the Mittio mark (the two i's; the second dot has flown off like a sent post) and the word. */
.brand { display: flex; align-items: center; gap: 10px; flex: none; font: 500 .9375rem/1 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.mark { height: 18px; width: auto; flex: none; fill: currentColor; overflow: visible; margin-top: -3px; }
.mark__fly { fill: var(--brand); transition: transform 360ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .brand:hover .mark__fly { transform: translate(2px, -2px); } }
/* Signed out: only the brand shows, top left, over the centred form. */
body:not(.signed-in) :is(#workspace, #who, #signout, #crumb) { display: none; }
#signout { flex: none; padding: 0; border: 0; background: none; font: inherit; font-size: .8125rem; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#signout:hover { color: var(--ink); }
@media (max-width: 899px) { #signout { margin-left: .75rem; } }
body:not(.signed-in) header { position: absolute; top: 0; left: 0; padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1.5rem; }
body:not(.signed-in) header .brand > span { display: inline; }
@media (prefers-reduced-motion: reduce) { .mark__fly { transition: none; } }

/* Platform logos, in each platform's own colour, always next to the written name. */
.logo { width: 1em; height: 1em; flex: none; vertical-align: -.14em; }
.logo.youtube { fill: #FF0000; } .logo.instagram { fill: #FF0069; } .logo.facebook { fill: #4D8DFF; }
.acct .logo { margin-right: .4em; }
.row > button:has(> .logo) { display: inline-flex; align-items: center; gap: .5rem; }
.row > button > .logo { width: 1.125em; height: 1.125em; }
.day .event .logo { width: .8125rem; height: .8125rem; margin-right: .3rem; vertical-align: -.16em; }
.month button b .logo { width: .6875rem; height: .6875rem; margin: 0 1px; vertical-align: 0; }

/* Signed out: the other ways to sign in */
button.link { min-height: 0; padding: 0; background: none; color: var(--dim); font-weight: 400; font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
button.link:active:not(:disabled) { background: none; }
main.narrow .or { margin: 1rem 0 .5rem; text-align: center; font-size: .875rem; }
/* The sign-in page (user, 2026-12-04): centred, the brand in the heading, the ways to sign in as one stack of large rounded controls,
   Google first in white, the email form below a rule. The header's brand is left out here: the heading carries it. */
.google > svg { width: 1.125em; height: 1.125em; margin-right: .625rem; vertical-align: -.18em; }
body:not(.signed-in):has(> main.signin) > header { display: none; }
main.signin { max-width: 26rem; text-align: center; }
main.signin h1 { font-size: clamp(2rem, 8vw, 2.625rem); font-weight: 700; line-height: 1.12; letter-spacing: -.035em; margin-bottom: 2.25rem; }
main.signin h1 .to { display: block; }
main.signin h1 .name { color: var(--brand); white-space: nowrap; }
main.signin h1 .mark { height: .82em; margin: 0 .16em 0 .08em; vertical-align: -.02em; }
main.signin :is(button.wide, input) { min-height: 54px; border-radius: 14px; font-size: 1rem; }
main.signin button.google { position: relative; display: flex; align-items: center; justify-content: center; background: #fff; color: #111214; box-shadow: none; font-weight: 600; }
main.signin button.google > svg { position: absolute; left: 1.125rem; width: 1.3125rem; height: 1.3125rem; margin: 0; }
main.signin .or { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 1rem; font-size: .9375rem; color: var(--faint); }
main.signin .or::before, main.signin .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
main.signin form { margin-top: 0; }
main.signin form label { margin: .625rem 0; }
main.signin form label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
main.signin input { padding: 0 1.125rem; border: 0; background-color: var(--raise); box-shadow: inset 0 0 0 1px var(--line); }
main.signin input::placeholder { color: var(--faint); }
main.signin input:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
main.signin form button.main { margin-top: .375rem; font-weight: 600; }
/* With Google offered, Google is the one white button; Continue steps back. */
main.signin:has(button.google) form button.main { background: var(--raise); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
main.signin .row { justify-content: center; margin-top: 1.125rem; }
main.signin p.legal { justify-content: center; margin-top: 2.5rem; }
main.narrow > .dim { margin-bottom: 1rem; }

/* Privacy, Terms and Data deletion links; the review account's note; the agreement box. */
p.legal { display: flex; flex-wrap: wrap; gap: .375rem 1.25rem; margin-top: 2rem; font-size: .8125rem; color: var(--dim); }
section p.legal { margin-top: .5rem; }
p.legal a { color: var(--dim); }
.small { font-size: .8125rem; }
p.review { margin: 0 0 1rem; padding: .5rem .75rem; background: color-mix(in srgb, var(--warn) 14%, var(--bg)); color: var(--ink); font-size: .875rem; }
label.check > span a { color: inherit; }

/* Queue: the departures board of mittio.app. Time, title, where it goes, status; a hairline under every row. */
ol.queue { list-style: none; margin: -1.25rem 0 0; padding: 0; }
ol.queue .day-name { padding: 22px 0 8px; border-bottom: 1px solid var(--line); }
.qrow { display: grid; grid-template-columns: 4.6em minmax(0, 1.6fr) minmax(0, 1fr) 9.5em; column-gap: 20px; align-items: baseline; width: 100%; min-height: 0; padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; transition: background-color 200ms ease; }
.qrow:active:not(:disabled) { transform: none; }
.qrow > span:first-child { font: 400 .875rem/1.35 var(--f-mono); font-variant-numeric: tabular-nums; }
.qrow b { font-weight: 400; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .to { color: var(--faint); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .tag { justify-self: end; }
.qrow.draft .tag { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .qrow:hover:not(:disabled) { background: var(--fill); } }
@media (max-width: 899px) {
  .qrow { grid-template-columns: 4.2em minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px; min-height: 0; }
  .qrow .to { grid-area: 2 / 2; }
  .qrow .tag { grid-area: 1 / 3 / 3 / 4; align-self: center; }
}
/* What a key may do, as on the site: small outlined names. */
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chips span { font: 400 .625rem/1 var(--f-mono); padding: 3px 5px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--dim); }
p.can { margin: .375rem 0 .25rem; line-height: 1; }
.entry strong { font-weight: 500; }
.day .event b, .month button b { font-family: var(--f-mono); font-weight: 400; }

main h3 { margin-top: 1.5rem; }
.split > div > a { display: inline-block; margin-top: 1rem; }
/* A caution that must be read, without a page of orange text: a quiet box with the accent edge. */
p.warn.note { margin: 1rem 0; padding: .625rem .875rem; background: var(--fill); box-shadow: inset 2px 0 var(--accent); color: var(--ink); font-size: .875rem; }
main.narrow form { margin-top: .5rem; }

/* Stats: each channel with its totals, then its videos; the bar under the views is that video's share of the channel's best. */
section.channel { margin-bottom: 2.5rem; }
section.channel > h2 { margin: 0 0 .75rem; font: 500 1rem/1.3 var(--f-body); letter-spacing: 0; text-transform: none; color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 12rem)); gap: 1px; margin-bottom: 1rem; }
.tile { display: grid; gap: .375rem; padding: .75rem .875rem; background: var(--fill); }
.tile strong { font: 500 1.5rem/1 var(--f-mono); font-variant-numeric: tabular-nums; color: var(--ink); }
table.videos th:nth-child(1) { width: 6rem; } table.videos th:nth-child(3) { width: 11rem; } table.videos th:nth-child(4), table.videos th:nth-child(5) { width: 6.5rem; }
table.videos .num, table.videos th:nth-child(n+3) { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
table.videos td a { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { table.videos td a:hover { text-decoration: underline; } }
.meter-bar { display: inline-block; vertical-align: middle; width: 4rem; height: 4px; margin-right: .625rem; background: linear-gradient(var(--accent), var(--accent)) 0 / var(--w) 100% no-repeat, var(--line); }
@media (max-width: 899px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile strong { font-size: 1.125rem; }
  table.videos th:nth-child(1), table.videos td:nth-child(1), table.videos th:nth-child(5), table.videos td:nth-child(5), .meter-bar { display: none; }
  table.videos th:nth-child(3) { width: 5rem; } table.videos th:nth-child(4) { width: 4rem; }
}

/* Settings (user, 2026-12-04): one calm column, a hairline between parts, the rarely used forms folded away. */
.settings { max-width: 40rem; }
.settings > section { padding: 1.75rem 0; border-top: 1px solid var(--line); }
.settings > section:first-child { padding-top: 0; border-top: 0; }
.settings > section > h2 { margin: 0 0 .875rem; }
.settings > section > p.dim { margin-bottom: .75rem; }
.settings h3 { margin: 1.25rem 0 .5rem; }
.settings .row { margin: .75rem 0 .5rem; }
.settings details { border-top: 1px solid var(--line); }
.settings > section > details:last-child, .settings .stack > details:last-child { border-bottom: 1px solid var(--line); }
.settings .stack { margin-top: 1rem; }
.settings details > div { padding: .25rem 0 1rem 1.0625rem; }
.settings details > div > form { max-width: 26rem; }
.ink { color: var(--ink); font-weight: 500; }
