/* The "Studio" look of the site's own pages: dark only, lime accent, Unbounded for headings,
   Manrope for text, JetBrains Mono for numbers. Fonts, colours and the top bar are in shell.css. */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--fg); background: var(--bg); }
[hidden] { display: none !important; }  /* classes like .btn set display, which would override it */
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }

main { max-width: 1280px; margin: 0 auto; padding: 24px 32px 56px; }
main.narrow { max-width: 960px; }
@media (max-width: 640px) {
  .topbar-inner { padding: 12px 16px; }
  main { padding: 16px 16px 40px; }
}
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { background: var(--raised); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }

/* Headings and page head */
h1 { margin: 0 0 8px; font-family: var(--display); font-size: clamp(24px, 4vw, 34px); font-weight: 700; line-height: 1.15; text-wrap: balance; }
h2 { margin: 28px 0 12px; font-family: var(--display); font-size: 17px; font-weight: 500; line-height: 1.3; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--accent); }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin: 8px 0 0; color: var(--muted); }
.facts form { margin: 0; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; margin-bottom: 22px; }
.page-head .lead { margin: 8px 0 0; max-width: 820px; color: var(--muted); }
.counters { display: flex; flex-wrap: wrap; gap: 28px; }
.counter strong { display: block; font: 500 30px/1.1 var(--mono); }
.counter.text strong { font-size: 22px; line-height: 1.36; }
.counter strong span { color: var(--muted); }
.counter .label { color: var(--muted); font-size: 13px; }
.counter.accent strong { color: var(--accent); }
.counter.warn strong { color: var(--warn); }
a.counter { text-decoration: none; color: inherit; }
.description { margin: 12px 0; overflow-wrap: anywhere; }
.description img { max-width: 100%; }
.description pre { overflow-x: auto; background: var(--raised); padding: 10px 12px; border-radius: 10px; }
.description code { font-family: var(--mono); font-size: 13px; }
.description > :first-child { margin-top: 0; }
.description > :last-child { margin-bottom: 0; }

/* Cards and layout */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 16px 0; }
.card h2 { margin: 0 0 10px; font-size: 15px; }
.card.plain { background: transparent; }
.card.outline-warn { border-color: var(--warn); }
.columns { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.columns > .col { flex: 1 1 400px; min-width: 0; }
.columns > .col.wide { flex: 1.25 1 460px; }
.columns > .col.side { flex: 0.6 1 280px; }
.columns > .col > :first-child { margin-top: 0; }
.columns > .col > :last-child { margin-bottom: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; align-items: start; }
.cards > .card { margin: 0; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-head h2 { margin: 0; font-size: 17px; }
.card-head h2 a { color: var(--fg); text-decoration: none; }
.card-head h2 a:hover { color: var(--accent); }
.rows { list-style: none; margin: 10px 0 0; padding: 0; }
.rows li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; min-height: 44px;
           padding: 4px 0; border-top: 1px solid var(--line); }
.rows li > a:first-child, .rows .name { color: var(--fg); text-decoration: none; overflow-wrap: anywhere; }
.rows li > a:first-child:hover { color: var(--accent); }
details summary { cursor: pointer; }
details.card > summary { font-family: var(--display); font-size: 15px; font-weight: 500; }
details.card[open] > summary { margin-bottom: 12px; }
details.about { margin: 8px 0 0; }
details.about > summary { color: var(--muted); font-size: 14px; }
details.about[open] > summary { margin-bottom: 8px; }
.facts-list { margin: 0 0 10px; }
.facts-list dt { color: var(--muted); font-size: 13px; }
.facts-list dd { margin: 0 0 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px;
       border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 700;
       text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.secondary { background: transparent; border-color: var(--line-strong); color: var(--fg); font-weight: 500; }
.btn.secondary:hover { border-color: var(--muted); background: transparent; color: var(--fg); }
.btn.danger { background: transparent; border-color: var(--warn); color: var(--warn); font-weight: 500; }
.btn.danger:hover { background: transparent; border-color: var(--warn-fg); color: var(--warn-fg); }
.btn.danger.solid { background: var(--warn); color: var(--on-accent); font-weight: 700; }
.btn.small { min-height: 36px; padding: 0 14px; }
.btn.wide { width: 100%; }
.btn:disabled, .btn.disabled { opacity: 0.45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.btn-row form { margin: 0; }
.btn-row + .table-wrap, .btn-row + .cards { margin-top: 22px; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
button.link:hover { color: var(--accent-hover); }
button.link.danger, a.danger { color: var(--warn); }
.inline-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.inline-actions form, form.inline-delete { display: inline; margin: 0; }
button.icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; font: inherit; line-height: 1;
              border: 1px solid var(--line-strong); border-radius: 8px; background: transparent; color: var(--fg); cursor: pointer; }
button.icon:disabled { border-color: var(--line); color: var(--faint); cursor: not-allowed; }

/* Badges: "new" asks for attention, "ok" is settled, "warn" is late or closed, "none" is absent */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; white-space: nowrap;
         background: var(--raised); color: var(--fg); border: 1px solid transparent; }
.badge.new { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.badge.ok { background: var(--raised); color: var(--fg); }
.badge.warn { background: transparent; border-color: var(--warn); color: var(--warn); }
.badge.bad { background: var(--warn); color: var(--on-accent); font-weight: 700; }
.badge.info { background: transparent; border-color: var(--info); color: var(--info); }
.badge.none { background: transparent; border-color: var(--line-strong); color: var(--muted); }
a.badge { text-decoration: none; }
a.badge.new:hover { background: var(--accent-hover); color: var(--on-accent); }

.notice { border: 1px solid var(--line-strong); border-radius: 14px; padding: 12px 16px; margin: 16px 0; }
.notice.info { border-color: var(--info); color: var(--info-fg); }
.notice.warn { border-color: var(--warn); color: var(--warn-fg); }
.notice.bad { border-color: var(--warn); background: #2A1712; color: var(--warn-fg); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.notice form { display: inline; margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.card .table-wrap { border: 0; border-radius: 0; background: transparent; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; white-space: nowrap; }
table.list th, table.list td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; }
table.list td.num { font-family: var(--mono); font-size: 13px; }
table.list td.when { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
table.list td.strong a, table.list a.strong { color: var(--fg); font-weight: 700; text-decoration: none; }
table.list td.strong a:hover, table.list a.strong:hover { color: var(--accent); }
td.actions { white-space: nowrap; text-align: right; }
td.actions form { display: inline; margin: 0 0 0 8px; }
td.actions .row-actions { display: inline-flex; align-items: center; gap: 6px; }
th.share, td.share { width: 22%; min-width: 90px; }
td.check { width: 1.5em; }
.bar { height: 8px; background: var(--raised-2); border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); min-width: 1px; }
.bar.quiet > div { background: var(--fg); }
.share-cell { display: flex; align-items: center; gap: 10px; }
.share-cell .bar { flex: 1; height: 6px; }

/* Filters: chips are links, so they work without scripts */
.toolbar { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; margin: 0 0 22px;
           border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.toolbar-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 28px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chips .label { color: var(--muted); font-size: 13px; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
        border: 1px solid var(--line-strong); color: var(--fg); text-decoration: none; white-space: nowrap; }
.chip:hover { border-color: var(--muted); color: var(--fg); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.chip.on:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.chip.square { min-height: 36px; padding: 0 14px; border-radius: 10px; }
.segmented { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--bg); }
.segmented a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.segmented a.on { background: var(--raised-2); color: var(--fg); }
.filters { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 12px 0; }
.filters label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.stats { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 12px 0; }
.stats strong { font: 500 22px/1.1 var(--mono); }

/* Tiles of work */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 16px; }
.tiles.teams { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); align-items: start; }
.tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; }
.tile.empty { border-style: dashed; background: transparent; }
.tile .thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; padding: 0 12px;
               background: repeating-linear-gradient(135deg, var(--raised) 0 12px, #1C2025 12px 24px);
               color: var(--muted); font: 12px var(--mono); text-align: center; text-decoration: none; overflow: hidden; overflow-wrap: anywhere; }
.tile .thumb.image { padding: 0; }
.tile .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; }
.tile-name { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tile-name a, .tile-name .name { color: var(--fg); font-weight: 700; font-size: 16px; text-decoration: none; overflow-wrap: anywhere; }
.tile-name a:hover { color: var(--accent); }
.tile-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tile-members li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.tile-members .name { font-weight: 700; color: var(--fg); text-decoration: none; }
.tile-members a.name:hover { color: var(--accent); }
.tile-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tile-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font: 13px var(--mono); }
.tile .btn { margin-top: auto; }
/* Tags: teachers' marks on work (templates/submissions/_tags.html) */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* A tag is drawn in its own colour, --tag-bg, with the text colour picked for it, --tag-fg (Tag.style). */
.tag { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; margin: 0; padding: 0 9px; border: 1px solid rgb(255 255 255 / 0.16);
       border-radius: 7px; background: var(--tag-bg, var(--raised)); color: var(--tag-fg, var(--fg)); font: inherit; font-size: 13px; white-space: nowrap; }
.tag.add, .tag.switch { border-color: var(--line-strong); background: transparent; color: var(--muted); cursor: pointer; }
.tag.add { border-style: dashed; list-style: none; }
.tag.add::-webkit-details-marker { display: none; }
.tag.add:hover, .tag.switch:hover { border-color: var(--muted); color: var(--fg); }
/* A switch that is off shows its colour as a dot; switched on, it is the tag itself with a tick. */
.tag.switch::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--tag-bg, var(--line-strong)); }
.tag.switch.on, .tag.switch.on:hover { border-color: rgb(255 255 255 / 0.16); background: var(--tag-bg, var(--raised)); color: var(--tag-fg, var(--fg)); }
.tag.switch.on::before { content: "✓"; width: auto; height: auto; border-radius: 0; background: none; }
.tag.removable button { padding: 0; border: 0; background: none; color: inherit; opacity: 0.7; font: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.tag.removable button:hover { opacity: 1; }
.chip .dot { width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; }
.chip.on .dot { outline: 1px solid var(--on-accent); }
input[type=color] { width: 44px; height: 44px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); cursor: pointer; }
/* In a list, "+ tag" opens the switches in place of the work's tags, which they show anyway. */
.tagger .open, .tagger[open] .closed { display: none; }
.tagger[open] .open { display: inline; }
.tagger[open] { flex-basis: 100%; }
.tagger[open] > summary { margin-bottom: 6px; border-style: solid; color: var(--fg); }
.tags:has(.tagger[open]) > .tag { display: none; }
.tag-switches { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.tag-row, .tag-library { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 12px 0 0; }
.tag-row .label, .tag-library .label { color: var(--muted); font-size: 13px; }
td.tags-cell { min-width: 9em; }
.chip.quiet { border-style: dashed; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 36px; padding: 4px 12px; border-radius: 999px; background: var(--raised); }
.pill a { color: var(--fg); font-weight: 700; text-decoration: none; }
.pill a:hover { color: var(--accent); }
label.pill { min-height: 44px; cursor: pointer; }
.empty-note { margin: 0; padding: 24px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); text-align: center; }
.neighbours { display: flex; flex-wrap: wrap; gap: 8px; }
.neighbours a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong);
                border-radius: 10px; color: var(--fg); text-decoration: none; }
.neighbours a:hover { border-color: var(--muted); }
.crumb-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; margin-bottom: 12px; }
.crumb-row .crumbs { margin: 0; }

/* Files */
.files { list-style: none; padding: 0; margin: 8px 0; }
.files li { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.files li:first-child { border-top: 0; }
.files .name { overflow-wrap: anywhere; font-weight: 700; }
.files a.name { color: var(--fg); text-decoration: none; }
.files a.name:hover { color: var(--accent); }
.files .size { color: var(--muted); font: 13px var(--mono); white-space: nowrap; }
.files .note { flex-basis: 100%; font-size: 13px; color: var(--warn); }
.files video.player { flex-basis: 100%; width: 100%; max-height: 70vh; background: #000; border-radius: 10px; }
.files .preview-box { flex-basis: 100%; display: block; line-height: 0; }
.files img.player { max-width: 100%; max-height: 60vh; border-radius: 10px; background: var(--bg); cursor: zoom-in; }
.copy-field { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.copy-field input { flex: 1 1 240px; min-width: 0; font-family: var(--mono); font-size: 13px; }

/* Upload */
.upload input[type=file] { font: inherit; max-width: 100%; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 30px 20px; text-align: center;
            border: 2px dashed var(--accent); border-radius: 14px; }
.dropzone.over { background: var(--accent-tint); }
.dropzone.off { border-color: var(--line-strong); }
.dropzone .title { font-family: var(--display); font-size: 18px; font-weight: 700; }
.dropzone .hint { max-width: 460px; color: var(--muted); }
.progress { height: 8px; background: var(--raised-2); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.progress > div { height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }

/* Forms */
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px;
  min-height: 44px; padding: 0 12px; max-width: 100%; }
textarea { padding: 10px 12px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); }
::placeholder { color: var(--faint); opacity: 1; }
.form { max-width: 760px; }
.form.wide { max-width: none; }
.field { margin: 0 0 20px; }
.field > label, .label-row label, .choices legend { display: block; font-weight: 700; margin-bottom: 6px; }
.label-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea { width: 100%; }
.field textarea { font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.field .preview { border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 12px; margin: 0; }
.field .help { font-size: 13px; margin-top: 6px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--warn); }
.field.checkbox > label { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.field.checkbox > label input { margin-top: 2px; flex: none; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 16px; }
.errorlist { list-style: none; padding: 0; margin: 6px 0; color: var(--warn); font-size: 13px; }
.choices { border: 0; padding: 0; margin: 16px 0; }
.choices label { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; }
.choices .choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 8px 8px 0; padding: 0 14px;
                   border: 1px solid var(--line-strong); border-radius: 999px; }
.choices .choice:has(input:checked) { border-color: var(--accent); }
/* Cleanup: show only the picker of the chosen scope (all of them without :has() support) */
.scope-form:has([name=scope][value=task]:checked) [data-scope]:not([data-scope=task]),
.scope-form:has([name=scope][value=course]:checked) [data-scope]:not([data-scope=course]),
.scope-form:has([name=scope][value=academic_year]:checked) [data-scope]:not([data-scope=academic_year]),
.scope-form:has([name=scope][value=student_group]:checked) [data-scope]:not([data-scope=student_group]) { display: none; }
.members { list-style: none; padding: 0; margin: 8px 0; }
.members li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.members li:first-child { border-top: 0; }
.members .name { font-weight: 700; }
.members form { margin: 0 0 0 auto; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
input.groups { width: 100%; min-width: 10em; }

/* Feedback thread */
.thread-items { list-style: none; padding: 0; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 12px; }
.thread-items .msg { background: var(--raised); border: 1px solid transparent; border-radius: 10px; padding: 12px 14px; }
.thread-items .msg.teacher { background: transparent; border-color: var(--line-strong); }
.thread-items .msg:target { border-color: var(--accent); }
.msg-head { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; font-size: 13px; }
.msg-head .name { font-weight: 700; }
.msg-head .when { font-family: var(--mono); color: var(--muted); }
.msg-body { overflow-wrap: anywhere; }
.msg-body p, .msg-body ul, .msg-body ol, .msg-body pre, .msg-body blockquote { margin: 6px 0; }
.msg-body > :last-child { margin-bottom: 0; }
.msg-body ul { list-style: disc; }
.msg-body pre { overflow-x: auto; background: var(--bg); padding: 8px 10px; border-radius: 8px; }
.msg-body code { font-family: var(--mono); font-size: 13px; }
.msg-body blockquote { padding-left: 10px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.msg-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin-top: 6px; font-size: 13px; }
.msg-actions form { margin: 0; }
.msg-actions summary { color: var(--accent); }
.msg-actions details[open] { flex-basis: 100%; }
.msg-actions details .btn { margin-top: 8px; }
.thread-items .event { color: var(--muted); font-size: 13px; }
.thread-items .event .when { font-family: var(--mono); }
.thread-items .marker { display: flex; align-items: center; gap: 12px; color: var(--accent); font-size: 13px; font-weight: 700; text-align: center; }
.thread-items .marker::before, .thread-items .marker::after { content: ""; flex: 1; min-width: 16px; border-top: 1px solid var(--accent); }
.thread textarea { width: 100%; }
.msg-form .btn-row { margin-top: 8px; }

/* Transfer speed page */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 16px; margin: 16px 0; }
.meter { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.meter h2 { margin: 0 0 6px; font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--muted); }
.meter .value { font: 500 48px/1.1 var(--mono); }
.meter .value small { font-size: 18px; font-weight: 400; color: var(--muted); }
.meter.up .value { color: var(--up); }
.meter.down .value { color: var(--down); }
.chart { width: 100%; height: 240px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font: 12px var(--mono); }
.chart .line { fill: none; stroke-width: 2.5; }
.chart .line.up { stroke: var(--up); }
.chart .line.down { stroke: var(--down); }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.legend .up::before, .legend .down::before { content: ""; display: inline-block; width: 14px; height: 3px; margin: 0 8px 3px 0; }
.legend .up::before { background: var(--up); }
.legend .down::before { background: var(--down); }
