/* The sample screens' layout; colours, type and the kit parts' look come from theme/theme.css, ui/ui.css and, for the
   shell, ui/gestures.css and ui/shell/shell.css. */
.status-line { margin: 0 var(--pad) var(--gap); }
.ui-screen > :not(.ui-large-title) { max-width: 40rem; margin-inline: auto; padding-inline: var(--pad); }
input, textarea { padding: .5rem; }
/* room on the right for the kit's caret, which a plain padding would cover */
select { padding: .5rem 2rem .5rem .65rem; }
#add { margin: 0 0 var(--gap); }   /* the list under the form: the audit (e2e/spacing.spec.mjs) wants a gap between separate blocks */
#add input { flex: 1; min-width: 10rem; }
.ui-list { padding: 0; margin: 0; }

/* a task: the tick, then its text with the due day under it */
.task-row { list-style: none; display: flex; align-items: center; gap: .5rem; }
.task-check { flex: none; width: 1.4rem; height: 1.4rem; margin: 0; }
.task-main { flex: 1; display: block; justify-content: flex-start; text-align: left; background: none; border: 0; padding: .5rem 0; font: inherit; color: inherit; min-width: 0; }
.task-sub { display: block; font-size: .8rem; color: var(--muted); }
.task-sub.overdue { color: var(--danger); }
.task-row.done .task-main { text-decoration: line-through; }
/* a task changed (here or on another device) since the tabs last showed */
.task-row.changed { border-inline-start: 3px solid var(--accent); }
.big .task-main { padding: 1rem 0; font-size: 1.15rem; }
.task-group-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; margin: var(--gap) 0 .25rem; color: var(--muted); }

/* the list picker under each title: chips in a row that scrolls sideways on a phone */
.list-picker { display: flex; gap: .4rem; overflow-x: auto; padding-block: .25rem var(--gap); }
.list-chip { flex: none; border-radius: var(--pill-r, 1em); }
.list-chip[aria-pressed="true"] { background: var(--accent); color: var(--bg); }

.task-when { display: flex; gap: var(--gap); }
.task-when > label { flex: 1; }
.list-manage-row input { flex: 1; min-width: 0; }
.done-tools { margin: 0 0 var(--gap); }

/* toasts sit above the tab bar on a phone (the page's own room under its last row is the kit's: .ui-screen::after) */
body { margin: 0; }
.toasts { bottom: calc(var(--tap) + var(--pad) * 3 + 1rem + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 600px) { .toasts { bottom: var(--pad); } }


/* the app's icon beside its name in the side bar */
.ui-sidebar-name { display: flex; align-items: center; gap: .5rem; }
.app-mark { flex: none; border-radius: 22%; }

/* the bar's icon buttons (search) and the slot the search box fills over the bar (css/search.css shows it while searching) */
.bar-icon { min-width: var(--tap); display: inline-flex; align-items: center; justify-content: center; }
.bar-search { display: none; }

/* ---- the questions (screens/tys.js) ---- */
.tys-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--gap); margin-block: 0 var(--gap); }
/* a section or a paper: a row that opens to its questions; a press shades the whole row */
.tys-box { border-block-end: 1px solid color-mix(in srgb, currentColor 12%, transparent); }
.tys-summary { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); padding: .35rem .25rem; cursor: pointer; font-weight: 600; }
.tys-summary:active, .tys-row:active { background: color-mix(in srgb, currentColor 8%, transparent); }
.tys-main { flex: 1; min-width: 0; display: block; }
.tys-count { flex: none; font-size: .85rem; font-weight: 400; color: var(--muted); }
.tys-topic { font-size: .85rem; font-weight: 600; color: var(--accent); margin: var(--gap) .25rem .15rem; }
.tys-list > li { list-style: none; border-block-start: 1px solid color-mix(in srgb, currentColor 8%, transparent); }
.tys-row { display: flex; align-items: center; gap: .5rem; width: 100%; min-height: var(--tap); padding: .55rem .25rem; text-align: left; background: none; border: 0; border-radius: 0; font: inherit; color: inherit; cursor: pointer; }
.tys-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.tys-sub { display: block; font-size: .8rem; color: var(--muted); margin-block-start: .1rem; }
.tys-row.is-done .tys-text { color: var(--muted); }
.tys-marks { flex: none; display: inline-flex; gap: .2rem; }
.tys-star { color: var(--warn); fill: currentColor; }
.tys-check { color: var(--ok); }
.big .tys-row { padding-block: .9rem; font-size: 1.1rem; }
.big .tys-text { -webkit-line-clamp: 3; line-clamp: 3; }
#tys-q { width: 100%; box-sizing: border-box; }

/* a question, as the paper set it */
.tys-q { line-height: 1.55; overflow-wrap: anywhere; }
.tys-q p { margin: 0 0 .7rem; }
.tys-q :is(ol, ul) { margin: 0 0 .7rem; padding-inline-start: 1.4rem; }
.tys-q li > p { margin-block-end: .3rem; }
.tys-q table { border-collapse: collapse; margin-block-end: .7rem; display: block; overflow-x: auto; max-width: 100%; }
.tys-q :is(td, th) { border: 1px solid color-mix(in srgb, currentColor 25%, transparent); padding: .25rem .5rem; text-align: left; vertical-align: top; }
.tys-fig { display: block; max-width: 100%; height: auto; margin-block-end: .7rem; background: #fff; border-radius: 6px; }
.tys-actions { flex-wrap: wrap; gap: .5rem; margin-block-start: var(--gap); }
.tys-actions > [aria-pressed="true"] { background: var(--accent); color: var(--bg); }
