@import url("/vendor/athena/res/themes/default/style.css");
@import url("/vendor/athena/res/themes/dark/style.css") (prefers-color-scheme: dark);

/* Samverk: a calm, light look on top of Athena UI. Only classes (the page runs under a strict Content-Security-Policy, so no inline styles).
   The colours are Athena's design tokens, set here for the light and the dark mode; everything below uses them. */

:root {
  --athena-accent: #3b5bdb;
  --athena-accent-fg: #fff;
  --athena-focus: #2b44b0;
  --athena-bg: #f5f6fa;
  --athena-surface: #ffffff;
  --athena-surface-alt: #eef0f6;
  --athena-hover: #e9edfb;
  --athena-line: #dde1ec;
  --athena-border: #c9cfdf;
  --athena-muted: #5d6578;
  --athena-radius: 10px;
  --athena-shadow: 0 1px 2px rgb(20 28 60 / 6%), 0 6px 18px rgb(20 28 60 / 8%);
  --sv-header: #1c2540;
  --sv-header-fg: #f2f4fb;
  --sv-soft: 0 1px 2px rgb(20 28 60 / 6%);
  --sv-backlog: #8a93a8; --sv-todo: #3b82c4; --sv-doing: #d98b0b; --sv-review: #8e5bd1; --sv-blocked: #d64545; --sv-done: #2f9e63; --sv-dropped: #9aa1b2;
}
:root[data-mode="dark"] {
  --athena-accent: #7c96f5;
  --athena-accent-fg: #0d1226;
  --athena-focus: #a6b8ff;
  --athena-bg: #12151d;
  --athena-surface: #1b2030;
  --athena-surface-alt: #232a3d;
  --athena-hover: #26304a;
  --athena-line: #2e3650;
  --athena-border: #3a4466;
  --athena-muted: #a2aac0;
  --athena-shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 22px rgb(0 0 0 / 35%);
  --sv-header: #0e1220;
  --sv-header-fg: #e8ebf7;
  --sv-soft: 0 1px 2px rgb(0 0 0 / 40%);
  --sv-backlog: #8d96b0; --sv-todo: #62a3e3; --sv-doing: #e5a63a; --sv-review: #b18af0; --sv-blocked: #ef7070; --sv-done: #4cc38a; --sv-dropped: #7d849a;
}

html, body { margin: 0; }
#container, #header, #wrapper, #footer { box-sizing: border-box; max-width: 100%; }
body { background: var(--athena-bg); color: var(--athena-fg); font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.5; }

/* ---- the frame: header band, sidebar, content ---- */
#header { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .6rem 1.5rem; background: var(--sv-header); color: var(--sv-header-fg); border-bottom: 3px solid var(--athena-accent); }
#header img { height: 30px; width: 30px; border-radius: 8px; display: block; }
#header h1, #header .header-title { margin: 0; font-size: 1.25rem; letter-spacing: .02em; color: inherit; }
#header a { color: inherit; text-decoration: none; }
#user_bar { margin-inline-start: auto; display: flex; align-items: center; gap: .6rem; }
#user_bar button { background: transparent; color: var(--sv-header-fg); border: 1px solid rgb(255 255 255 / 30%); border-radius: 999px; padding: .3rem .9rem; font: inherit; font-size: .85rem; cursor: pointer; }
#user_bar button:hover { background: rgb(255 255 255 / 12%); }
#footer { padding: .75rem 1.5rem; font-size: .8rem; color: var(--athena-muted); }

.app-shell { display: flex; align-items: flex-start; gap: 1.75rem; width: 100%; max-width: 1560px; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; box-sizing: border-box; }
.view-area { flex: 1 1 auto; min-width: 0; outline: none; }
.app-shell .sidebar { flex: 0 0 13.5rem; position: sticky; top: 1rem; background: var(--athena-surface); border: 1px solid var(--athena-line); border-radius: var(--athena-radius); padding: .5rem; box-shadow: var(--sv-soft); }
.app-shell .sidebar-link { border-radius: 8px; padding: .5rem .75rem; }
.app-shell .sidebar-link:hover { background: var(--athena-hover); }
.app-shell .sidebar-link[aria-current], .app-shell .sidebar-link.active, .app-shell .sidebar-link[aria-selected="true"] { background: var(--athena-accent); color: var(--athena-accent-fg); font-weight: 600; }
@media (max-width: 760px) { .app-shell { flex-direction: column; align-items: stretch; padding: .75rem; } .app-shell .sidebar { flex-basis: auto; position: static; } #header { padding: .5rem 1rem; } }

/* ---- pages ---- */
.sv-page { max-width: 74rem; margin: 0 auto; }
.sv-page h1 { margin: 0 0 .25rem; font-size: 1.75rem; letter-spacing: -.01em; }
.sv-page h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.sv-page h3 { font-size: 1rem; margin: 0 0 .25rem; overflow-wrap: anywhere; }
.sv-intro { margin: .15rem 0 .75rem; color: var(--athena-muted); }
.sv-pagehead { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.sv-pagehead .sv-intro { margin-bottom: 0; }
.sv-block { margin-block: 1.5rem; }
.sv-panel { background: var(--athena-surface); border: 1px solid var(--athena-line); border-radius: var(--athena-radius); padding: 1.1rem 1.25rem 1.25rem; margin-block: 1rem; box-shadow: var(--sv-soft); }
.sv-empty { color: var(--athena-muted); }

/* ---- cards, chips, avatars ---- */
.sv-cards { display: grid; gap: .85rem; }
.sv-card { background: var(--athena-surface); border: 1px solid var(--athena-line); border-radius: var(--athena-radius); padding: .9rem 1.1rem; box-shadow: var(--sv-soft); transition: box-shadow .15s, border-color .15s; }
.sv-card:hover { border-color: var(--athena-border); box-shadow: var(--athena-shadow); }
.sv-meta { font-size: .8125rem; color: var(--athena-muted); display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; margin-bottom: .35rem; }
.sv-preview { margin: .25rem 0 .6rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.sv-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.sv-tag { display: inline-block; border-radius: 999px; padding: .05rem .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--athena-surface-alt); color: var(--athena-muted); }
.sv-tag-approval { background: #fde8c8; color: #8a4b00; } .sv-tag-decision { background: #e5defa; color: #4b2f9a; } .sv-tag-question { background: #d9ecfb; color: #165a92; }
:root[data-mode="dark"] .sv-tag-approval { background: #4a3512; color: #f3c47a; } :root[data-mode="dark"] .sv-tag-decision { background: #36295f; color: #cdb8ff; } :root[data-mode="dark"] .sv-tag-question { background: #17384f; color: #8cc6f3; }
.sv-recommended { color: var(--athena-success); font-weight: 600; }
.sv-avatar { flex: 0 0 auto; display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--athena-accent); color: var(--athena-accent-fg); font-weight: 700; font-size: .9rem; letter-spacing: .02em; }
.sv-card .sv-avatar, .sv-page h3 .sv-avatar { width: 1.7rem; height: 1.7rem; font-size: .7rem; vertical-align: middle; }
.sv-quiet { background: transparent; border: 1px solid var(--athena-line); border-radius: 8px; color: var(--athena-muted); padding: .2rem .7rem; font: inherit; font-size: .8rem; cursor: pointer; }
.sv-quiet:hover:not(:disabled) { background: var(--athena-hover); color: var(--athena-fg); }
.sv-quiet:disabled { opacity: .45; cursor: not-allowed; }

/* ---- people and tokens ---- */
.sv-people, .sv-tokens { list-style: none; margin: 0 0 1rem; padding: 0; }
.sv-person { display: flex; align-items: center; gap: .85rem; padding: .6rem .25rem; border-top: 1px solid var(--athena-line); }
.sv-person:first-child { border-top: 0; }
.sv-person-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.sv-person-main .sv-meta { margin: 0; }
.sv-person-tags { display: flex; gap: .35rem; flex-wrap: wrap; }
.sv-off { opacity: .6; }
.sv-tokens li { display: flex; align-items: center; gap: .6rem; padding: .25rem 0; }

/* ---- forms ---- */
.sv-form { display: grid; gap: .8rem; max-width: 38rem; margin-block: 1rem .25rem; }
.sv-field { display: grid; gap: .25rem; }
.sv-field label { font-weight: 600; font-size: .9rem; }
.sv-field input, .sv-field select, .sv-field textarea, .sv-page select, .sv-page textarea, .sv-page input[type=text], .sv-page input[type=date] {
  font: inherit; max-width: 100%; box-sizing: border-box; padding: .5rem .65rem; border: 1px solid var(--athena-border); border-radius: 8px; background: var(--athena-surface); color: var(--athena-fg);
}
.sv-field input:focus, .sv-field select:focus, .sv-field textarea:focus, .sv-page select:focus, .sv-page textarea:focus, .sv-page input:focus { outline: 2px solid var(--athena-focus); outline-offset: 1px; }
.sv-field[hidden] { display: none; }
.sv-page textarea { flex: 1 1 16rem; min-height: 4.5rem; }

/* ---- sign in ---- */
.sv-login { max-width: 25rem; margin: 3.5rem auto; padding: 2rem 2rem 2.25rem; background: var(--athena-surface); border: 1px solid var(--athena-line); border-radius: 16px; box-shadow: var(--athena-shadow); display: grid; gap: .85rem; }
.sv-login h1 { margin: 0; text-align: center; font-size: 1.7rem; }
.sv-login .sv-intro { text-align: center; margin: 0 0 .5rem; }
.sv-logo { width: 3.4rem; height: 3.4rem; margin: 0 auto; border-radius: 14px; background: url("/img/logo.svg") center / cover no-repeat; box-shadow: 0 6px 16px rgb(59 91 219 / 35%); }

/* ---- the board ---- */
.sv-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 1fr); gap: 1rem; overflow-x: auto; padding: .25rem .1rem 1rem; align-items: start; }
.sv-column { --col: var(--sv-backlog); background: var(--athena-surface-alt); border-radius: var(--athena-radius); border-top: 4px solid var(--col); padding: .6rem; min-height: 6rem; }
.sv-column h3 { margin: .1rem .25rem .6rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--athena-muted); }
.sv-col-backlog { --col: var(--sv-backlog); } .sv-col-todo { --col: var(--sv-todo); } .sv-col-doing { --col: var(--sv-doing); } .sv-col-review { --col: var(--sv-review); }
.sv-col-blocked { --col: var(--sv-blocked); } .sv-col-done { --col: var(--sv-done); } .sv-col-dropped { --col: var(--sv-dropped); }
.sv-task { background: var(--athena-surface); border: 1px solid var(--athena-line); border-left: 3px solid var(--col, var(--athena-line)); border-radius: 8px; padding: .55rem .7rem; margin-bottom: .6rem; overflow-wrap: anywhere; box-shadow: var(--sv-soft); }
.sv-task:hover { box-shadow: var(--athena-shadow); }
.sv-task-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .74rem; color: var(--athena-muted); }
.sv-task .sv-meta { margin: .3rem 0 .4rem; }
.sv-task select { width: 100%; font-size: .82rem; padding: .25rem .4rem; }
.sv-prio { border-radius: 999px; padding: 0 .5rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; background: var(--athena-surface-alt); }
.sv-prio-high { background: #fde8c8; color: #8a4b00; } .sv-prio-critical { background: #fbd5d5; color: #9b1c1c; } .sv-prio-low { color: var(--athena-muted); }
:root[data-mode="dark"] .sv-prio-high { background: #4a3512; color: #f3c47a; } :root[data-mode="dark"] .sv-prio-critical { background: #55191c; color: #ff9d9d; }
.sv-meta a { color: var(--athena-accent); text-decoration: none; font-weight: 600; }
.sv-meta a:hover { text-decoration: underline; }

/* ---- small things ---- */
.sv-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .7rem .9rem; margin-bottom: 1rem; background: var(--athena-surface); border: 1px solid var(--athena-line); border-radius: var(--athena-radius); box-shadow: var(--sv-soft); }
.sv-toolbar form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; }
.sv-toolbar input[type=text] { min-width: 14rem; }
.sv-page button:not([class]) { font: inherit; font-size: .85rem; padding: .35rem .9rem; border: 1px solid var(--athena-border); border-radius: 8px; background: var(--athena-surface); color: var(--athena-fg); cursor: pointer; }
.sv-page button:not([class]):hover { background: var(--athena-hover); }
.sv-card > a, .sv-card > p + a { display: inline-block; margin-top: .4rem; color: var(--athena-accent); font-size: .85rem; font-weight: 600; text-decoration: none; }
.sv-card > a:hover { text-decoration: underline; }
.sv-page ul { padding-inline-start: 1.2rem; }
.sv-page li { margin-block: .3rem; }

.sv-task select.sv-owner { margin-bottom: .35rem; }

/* the title of a task is what you read first: bold and a little larger; the key above it stays small and grey */
.sv-task-title { font-weight: 650; font-size: .97rem; line-height: 1.3; color: var(--athena-fg); margin: .1rem 0 .15rem; }
.sv-task-key { text-transform: uppercase; letter-spacing: .05em; }

/* ---- filters and the task page ---- */
.sv-check { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; cursor: pointer; user-select: none; }
.sv-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--athena-accent); }
.sv-total { margin: 0 0 0 auto; }
.sv-details { margin-block: .75rem 1rem; }
.sv-facts { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin-bottom: .6rem; font-size: .9rem; }
.sv-status { display: inline-block; border-radius: 999px; padding: .05rem .7rem; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--sv-backlog); }
.sv-status-backlog { background: var(--sv-backlog); } .sv-status-todo { background: var(--sv-todo); } .sv-status-doing { background: var(--sv-doing); } .sv-status-review { background: var(--sv-review); }
.sv-status-blocked { background: var(--sv-blocked); } .sv-status-done { background: var(--sv-done); } .sv-status-dropped { background: var(--sv-dropped); }
.sv-label { color: var(--athena-muted); }
.sv-meta-inline { color: var(--athena-muted); }
.sv-wide { max-width: 52rem; }
.sv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .8rem; }
.sv-wide { margin-bottom: 1.75rem; }
.sv-page h2 + .sv-cards, .sv-page .sv-details + .sv-row { margin-top: .25rem; }

/* ---- folding a column, the search ---- */
.sv-board { display: flex; gap: 1rem; overflow-x: auto; padding: .25rem .1rem 1rem; align-items: flex-start; }
.sv-column { flex: 1 0 15rem; max-width: 24rem; }
.sv-column.sv-collapsed { flex: 0 0 11rem; min-height: 0; }
.sv-colhead { display: flex; align-items: center; gap: .35rem; }
.sv-colhead h3 { margin: .1rem 0 .1rem; }
.sv-column:not(.sv-collapsed) .sv-colhead { margin-bottom: .45rem; }
.sv-fold { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border: 0; border-radius: 6px; background: transparent; color: var(--athena-muted); cursor: pointer; font-size: .9rem; line-height: 1; }
.sv-fold:hover { background: var(--athena-hover); color: var(--athena-fg); }
.sv-search { min-width: 14rem; flex: 1 1 14rem; max-width: 24rem; }

/* ---- links of a task ---- */
.sv-linklist { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .3rem; }
.sv-linkref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; overflow-wrap: anywhere; }
.sv-linkrows { list-style: none; margin: 0 0 .5rem; padding: 0; display: grid; gap: .5rem; }
.sv-linkrow { display: grid; grid-template-columns: 7rem minmax(10rem, 2fr) minmax(8rem, 1fr) auto; gap: .5rem; align-items: center; }
@media (max-width: 760px) { .sv-linkrow { grid-template-columns: 1fr 1fr; } .sv-linkrow input { grid-column: 1 / -1; } }
.sv-fieldlabel { font-weight: 600; font-size: .9rem; }
.sv-hint { margin: -.25rem 0 0; }

/* ---- the audit log ---- */
.sv-tablewrap { overflow-x: auto; border: 1px solid var(--athena-line); border-radius: var(--athena-radius); background: var(--athena-surface); box-shadow: var(--sv-soft); }
.sv-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.sv-table th { text-align: left; padding: .55rem .7rem; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--athena-muted); background: var(--athena-surface-alt); border-bottom: 1px solid var(--athena-line); white-space: nowrap; }
.sv-table td { padding: .5rem .7rem; border-top: 1px solid var(--athena-line); vertical-align: top; }
.sv-table tbody tr:hover { background: var(--athena-hover); }
.sv-nowrap { white-space: nowrap; }
.sv-details-cell { color: var(--athena-muted); overflow-wrap: anywhere; max-width: 28rem; }

/* ---- two-factor sign-in ---- */
.sv-steps { margin: .25rem 0 1rem; padding-inline-start: 1.3rem; display: grid; gap: .6rem; }
.sv-key { margin-top: .35rem; padding: .6rem .8rem; border: 1px dashed var(--athena-border); border-radius: 8px; background: var(--athena-surface-alt); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .08em; overflow-wrap: anywhere; user-select: all; }
.sv-key-address { width: 100%; max-width: 38rem; margin-top: .35rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; }
.sv-codes { list-style: none; margin: .75rem 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem; max-width: 40rem; }
.sv-codes li { padding: .45rem .7rem; border: 1px solid var(--athena-border); border-radius: 8px; background: var(--athena-surface-alt); font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; user-select: all; text-align: center; }
.sv-panel details { margin-top: .6rem; }
.sv-panel summary { cursor: pointer; font-weight: 600; padding: .25rem 0; }

/* ---- the grid view of the board (Athena's createBoard) ---- */
.sv-views { display: inline-flex; border: 1px solid var(--athena-line); border-radius: var(--athena-radius); overflow: hidden; }
.sv-view { border: 0; background: var(--athena-surface); color: var(--athena-fg); padding: .3rem .7rem; font: inherit; cursor: pointer; }
.sv-view[aria-pressed="true"] { background: var(--athena-accent); color: var(--athena-accent-fg, #fff); }
.sv-view:focus-visible { outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent)); outline-offset: -2px; }
.athena-board .board-column { border-top: 4px solid var(--col, var(--sv-backlog)); }
.athena-board .board-column[data-column-id="backlog"] { --col: var(--sv-backlog); } .athena-board .board-column[data-column-id="todo"] { --col: var(--sv-todo); }
.athena-board .board-column[data-column-id="doing"] { --col: var(--sv-doing); } .athena-board .board-column[data-column-id="review"] { --col: var(--sv-review); }
.athena-board .board-column[data-column-id="blocked"] { --col: var(--sv-blocked); } .athena-board .board-column[data-column-id="done"] { --col: var(--sv-done); }
.athena-board .board-column[data-column-id="dropped"] { --col: var(--sv-dropped); }
.athena-board .board-card .sv-task-key, .athena-board .board-card .sv-task-title { margin: 0; }
.sv-updated { margin-left: auto; white-space: nowrap; }
.sv-page > .sv-updated { display: block; margin: -.4rem 0 .6rem; }

/* ---- the first page ---- */
.sv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; margin: .4rem 0 1.2rem; }
.sv-tile { display: flex; flex-direction: column; gap: .1rem; padding: .8rem 1rem; background: var(--athena-surface); border: 1px solid var(--athena-line); border-radius: var(--athena-radius); color: var(--athena-fg); text-decoration: none; }
.sv-tile:hover { box-shadow: var(--athena-shadow); }
.sv-tile:focus-visible { outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent)); }
.sv-tile-n { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.sv-tile-l { color: var(--athena-muted); font-size: .85rem; }
.sv-tile.sv-hot { border-color: var(--athena-accent); }
.sv-attention { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.sv-att { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .55rem .8rem; background: var(--athena-surface); border: 1px solid var(--athena-line); border-left: 4px solid var(--athena-line); border-radius: var(--athena-radius); }
.sv-att-urgent { border-left-color: var(--sv-blocked, #d9480f); } .sv-att-check { border-left-color: var(--sv-doing, #e8a317); }
.sv-att a { font-weight: 600; color: var(--athena-fg); }

/* ---- tables and the answer of a request ---- */
.sv-table { width: 100%; border-collapse: collapse; background: var(--athena-surface); border: 1px solid var(--athena-line); border-radius: var(--athena-radius); overflow: hidden; }
.sv-table th, .sv-table td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--athena-line); vertical-align: top; }
.sv-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--athena-muted); background: var(--athena-surface-alt); }
.sv-table tbody tr:hover { background: var(--athena-hover); }
.sv-table tr.is-selected { background: var(--athena-hover); box-shadow: inset 3px 0 0 var(--athena-accent); }
.sv-answer { margin: .6rem 0; padding: .6rem .8rem; border-left: 4px solid var(--sv-done, #2f9e44); background: var(--athena-surface-alt); border-radius: var(--athena-radius); }
.sv-options { margin: .4rem 0; padding-left: 1.2rem; }

/* ---- two panels: a list and what is selected ---- */
.sv-split { display: grid; grid-template-columns: minmax(18rem, 1fr) minmax(20rem, 1.3fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .sv-split { grid-template-columns: 1fr; } }
.sv-rowlink { border: 0; background: transparent; padding: 0; font: inherit; color: var(--athena-accent); cursor: pointer; text-align: left; }
.sv-rowlink:hover { text-decoration: underline; }
.sv-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.sv-chip { border-top: 3px solid var(--col, var(--athena-line)); background: var(--athena-surface-alt); padding: .15rem .5rem; border-radius: var(--athena-radius); font-size: .8rem; }

/* ---- the account page: sections ---- */
.sv-account { display: grid; grid-template-columns: 13rem 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 800px) { .sv-account { grid-template-columns: 1fr; } .sv-sections { flex-direction: row; flex-wrap: wrap; } }
.sv-sections { display: flex; flex-direction: column; gap: .25rem; }
.sv-section-link { text-align: left; border: 0; background: transparent; padding: .55rem .8rem; border-radius: var(--athena-radius); font: inherit; color: var(--athena-fg); cursor: pointer; }
.sv-section-link:hover { background: var(--athena-hover); }
.sv-section-link[aria-current="true"] { background: var(--athena-accent); color: var(--athena-accent-fg, #fff); }
.sv-section-link:focus-visible { outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent)); }

/* ---- the board: long titles and the folded add-task form ---- */
/* the whole title is shown on the card, wrapped (it was cut after three lines, and the columns are narrower now); it is the card that grows, not the text that is lost */
.sv-task-title { overflow-wrap: anywhere; line-height: 1.35; }
.sv-addtask { margin: 0 0 .8rem; }
.sv-addtask > summary { cursor: pointer; font-weight: 600; padding: .35rem .2rem; color: var(--athena-accent); }
.sv-addtask > summary:focus-visible { outline: var(--athena-focus-width) solid var(--athena-focus, var(--athena-accent)); }

.sv-key { font-variant-ligatures: none; font-feature-settings: "zero" 1; letter-spacing: .08em; }

.sv-qr { display: block; width: 14rem; height: 14rem; margin: .5rem 0; background: #fff; border: 1px solid var(--athena-line); border-radius: var(--athena-radius); }

/* ---- small screens, tablets and touch (SMV-36) ---- */
/* a finger needs about 44 px: on touch screens the controls are taller */
@media (pointer: coarse) {
  button, select, input:not([type=checkbox]):not([type=radio]), summary, .sv-rowlink, .sv-section-link { min-height: 44px; }
  .sv-view { min-width: 44px; padding: .5rem .9rem; }
  .board-fold, .sv-fold { width: 44px; min-width: 44px; height: 44px; }
  input:not([type=checkbox]):not([type=radio]), select, textarea, .sv-task select, .sv-table select { font-size: 16px; }
  .sv-att a, .sv-card a, .sv-people a, .sv-table a, .sv-meta a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .2rem; }
  .sv-quiet { min-height: 44px; }
  .app-shell .sidebar button, .app-shell .sidebar-link { min-height: 44px; min-width: 44px; }
  .sv-check { min-height: 44px; display: inline-flex; align-items: center; gap: .5rem; }
  input[type=checkbox], input[type=radio] { width: 1.4rem; height: 1.4rem; }
  .board-card-handle { width: 2.2rem; background-size: 8px 8px; }   /* a finger moves a card only by its handle: it must be easy to hit */
}
@media (max-width: 760px) {
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px; }   /* below 16 px iOS zooms the page when a field gets the focus */
  .sv-toolbar input[type=text], .sv-toolbar input[type=search], .sv-search { min-width: 0; width: 100%; flex: 1 1 100%; }
  .sv-toolbar select { flex: 1 1 8rem; min-width: 0; }
  .sv-page h1 { font-size: 1.5rem; }
  .sv-panel, .sv-block { padding-left: .8rem; padding-right: .8rem; }
  .sv-tiles { grid-template-columns: repeat(2, 1fr); }
  .sv-qr { width: 100%; max-width: 16rem; height: auto; aspect-ratio: 1; }
  .sv-key { font-size: .95rem; word-break: break-all; }
  .sv-key-address { max-width: 100%; }
  .sv-linkrow { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  /* the board: columns one under the other (the columns view), or side by side with a snap and the next column peeking (the grid view) */
  .sv-board { flex-direction: column; align-items: stretch; overflow-x: visible; }
  .sv-board .sv-column { flex: none; width: 100%; max-width: none; box-sizing: border-box; }
  .sv-task select, .sv-task select.sv-owner, .sv-table select { font-size: 16px; }
  .athena-board { scroll-snap-type: x mandatory; scroll-padding-left: .25rem; }
  .athena-board .board-column { flex: 0 0 85%; max-width: 85%; scroll-snap-align: start; }
  .athena-board .board-column.is-collapsed { flex: 0 0 11rem; }
  /* tables become cards: a row is a block, every cell shows its label (data-label, see labelTables) */
  .sv-table, .sv-table tbody, .sv-table tr, .sv-table td { display: block; width: 100%; box-sizing: border-box; }
  .sv-table thead { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
  .sv-table tr { padding: .4rem 0; border-bottom: 1px solid var(--athena-line); }
  .sv-table td { display: flex; gap: .7rem; border: 0; padding: .2rem .8rem; overflow-wrap: anywhere; }
  .sv-table td::before { content: attr(data-label); flex: 0 0 5.2rem; color: var(--athena-muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; padding-top: .15rem; }
  .sv-table td[data-label=""]::before, .sv-table td:not([data-label])::before { content: none; }
  .sv-table td:empty { display: none; }
  .sv-nowrap { white-space: normal; }
  .sv-split { gap: .8rem; }
  .sv-account { gap: .6rem; }
  .sv-sections { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .2rem; }
  .sv-section-link { white-space: nowrap; }
  .sv-person { flex-wrap: wrap; }
}

/* ---- the sign-in form: the button as wide as the fields, centred, with room above it (SMV-39) ---- */
.sv-login form { display: flex; flex-direction: column; gap: .8rem; }
.sv-login form > div[aria-live]:empty { display: none; }
.sv-login form > button[type="submit"], .sv-login form > .athena-button[type="submit"] { width: 100%; justify-content: center; margin-top: .35rem; }
.sv-login form > .sv-quiet { align-self: center; }
.sv-login .sv-logo { margin-bottom: 0; }

/* ---- the board: every column fits when there is room, else the board scrolls sideways and shows that it does ---- */
/* the page is as wide as the window on the board (the other pages keep their reading width) */
.app-shell:has(.sv-board, .athena-board) { max-width: none; }
.sv-page:has(.sv-board, .athena-board) { max-width: none; margin: 0; }
/* columns shrink to a readable minimum before the board scrolls: seven columns need about 1400 px */
.sv-board .sv-column, .athena-board .board-column { box-sizing: border-box; flex: 1 1 11.5rem; min-width: 11.5rem; max-width: 24rem; scroll-snap-align: start; }
.sv-board .sv-column.sv-collapsed, .athena-board .board-column.is-collapsed { flex: 0 0 11rem; min-width: 0; }
.sv-board, .athena-board { scroll-snap-type: x proximity; scroll-padding-inline: .5rem;
  /* a fade at an edge that has more behind it (the "scroll shadows" of CSS): the cover scrolls with the content, the shadow stays at the edge */
  background:
    linear-gradient(to right, var(--athena-bg, #f4f5fa), transparent) 0 0 / 2.5rem 100% no-repeat local,
    linear-gradient(to left, var(--athena-bg, #f4f5fa), transparent) 100% 0 / 2.5rem 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgb(0 0 0 / 38%), transparent) 0 0 / 1.3rem 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgb(0 0 0 / 38%), transparent) 100% 0 / 1.3rem 100% no-repeat scroll;
  scrollbar-width: thin; scrollbar-color: var(--athena-muted) transparent; }

/* ---- readable text: messages, request texts and task details (richText) ---- */
.sv-text { max-width: 72ch; line-height: 1.6; overflow-wrap: anywhere; margin: .3rem 0 .6rem; }
.sv-text > p { margin: 0 0 .7rem; }
.sv-text > p:last-child, .sv-text > ul:last-child, .sv-text > ol:last-child { margin-bottom: 0; }
.sv-text ul, .sv-text ol { margin: 0 0 .7rem; padding-left: 1.4rem; }
.sv-text li { margin: .15rem 0; }
.sv-text code { font-family: var(--athena-font-mono, ui-monospace, monospace); font-size: .88em; padding: .05rem .3rem; border-radius: 4px; background: var(--athena-surface-alt); border: 1px solid var(--athena-line); overflow-wrap: anywhere; }
.sv-card .sv-text { margin-bottom: .2rem; }
.sv-page .sv-cards + .sv-row { margin-top: 1rem; } /* the message box does not touch the last message */
