/* Pages of the mockup with the type and the menu of Local News: one sans-serif family, heavy titles and
   figures, dark menu, blue and orange. A colour never carries a meaning alone. */

:root {
	--ink: #14263d;
	--mute: #55647a;
	--border: #d7deea;
	--paper: #f4f6fa;
	--panel: #ffffff;
	--pine: #14335c;
	--accent: #b84a06;
	--link: #1a66c2;
	--sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--title: #182230;
}

/* Colours of a section: text, bright line, soft background, menu icon. */
.sec-home { --sec: #14335c; --sec-hi: #5b86c9; --sec-soft: #e3eaf6; --sec-icon: #dfe8f7; }
.sec-verticals { --sec: #b84a06; --sec-hi: #ff8f2e; --sec-soft: #fde6d2; --sec-icon: #ff9d5c; }
.sec-topics { --sec: #1a66c2; --sec-hi: #3b8ef0; --sec-soft: #dfebfb; --sec-icon: #7ab8ff; }
.sec-articles { --sec: #8f4a12; --sec-hi: #e88a3a; --sec-soft: #fbe5d0; --sec-icon: #f5ad6e; }
.sec-prompts { --sec: #9a5b00; --sec-hi: #f2b01e; --sec-soft: #fcedc9; --sec-icon: #ffcf5c; }
.sec-activity { --sec: #0a709c; --sec-hi: #2bb3e6; --sec-soft: #d9eff9; --sec-icon: #6fd3f7; }
.sec-settings { --sec: #3d55a8; --sec-hi: #6f86e0; --sec-soft: #e3e8f8; --sec-icon: #aab8ff; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 14px/1.48 var(--sans); }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--sans); font-weight: 800; letter-spacing: 0; color: var(--title); }
h1 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; }
h2 { font-size: 15px; line-height: 1.3; }
.section-title h2::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; margin-right: 7px; vertical-align: 1px; }
a { color: var(--link); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
.muted, .lead, .dim { color: var(--mute); }
.dim { font-size: 13px; }
.lead { margin-top: 6px; max-width: 740px; font-size: 13px; }
.gap { margin-top: 15px; }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #e0661a; outline-offset: 3px; }
.skip { position: absolute; z-index: 9000; left: -100vw; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 10px; }

/* Menu */
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font: 800 18px/1.2 var(--sans); letter-spacing: 0; }
.brandmark { display: inline-grid; gap: 3px; transform: skew(-14deg); width: 22px; }
.brandmark i { display: block; background: #ff9a4d; height: 4px; }
.brandmark i:nth-child(2) { width: 70%; }
.brandmark i:nth-child(3) { width: 40%; }
.q-drawer:has(.side), .side { background: #172033; color: #dbe5f2; }
.side { display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: 100%; padding: 20px 12px 16px; }
.side-label, .eyebrow { font: 800 11px/1.4 var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.side-label { margin: 18px 8px 6px; color: #afbed1; }
.brand { padding: 0 8px; }
.brand + .side-label { margin-top: 26px; }
.navlink { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; margin-bottom: 2px; color: #eaf1fb; border-radius: 7px; text-decoration: none; font-size: 14px; font-weight: 680; }
.navlink:hover { background: #22314d; color: #fff; }
/* The current page: a blue band with an orange edge, and aria-current for a screen reader. */
.navlink.on { background: #2563eb; color: #fff; box-shadow: inset 3px 0 0 #f59e0b; }
.ico { width: 18px; text-align: center; font-size: 16px; color: #bdd4f7; line-height: 1; }
.navlink.on .ico { color: #fff; }
.sidefoot { margin-top: auto; border-top: 1px solid #33425e; padding: 20px 5px 0; }
.persona { display: flex; align-items: center; gap: 12px; }
.avatar { border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; background: #ffd9b5; color: #172033; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.persona strong, .persona small { display: block; overflow-wrap: anywhere; }
.persona small { color: #bccbe2; font-size: 11px; }
.signout { color: #e6ecf6; background: transparent; border: 0; margin-top: 12px; padding: 6px 0; cursor: pointer; }
.signout:hover { text-decoration: underline; }

/* Header */
.top { min-height: 56px; background: var(--panel); color: var(--mute); border-bottom: 1px solid var(--border); box-shadow: 0 1px 8px rgba(16, 24, 40, .06); display: flex; align-items: center; gap: 13px; padding: 0 clamp(16px, 2vw, 28px); font-size: 13px; font-weight: 600; }
.crumb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-toggle { color: var(--ink); font-size: 22px; }
.languages { display: flex; gap: 4px; font-size: 12px; font-weight: 650; }
.languages a { padding: 4px 9px; border: 1px solid transparent; border-radius: 20px; text-decoration: none; }
.languages a:hover { background: #e8eff9; }
.languages a.on { border-color: #c3d0e4; background: var(--panel); color: var(--ink); }

/* Content */
.nicegui-content { padding: 0; gap: 0; align-items: stretch; }
main.page { width: 100%; max-width: 1680px; margin: 0; padding: 22px clamp(16px, 2vw, 28px) 40px; outline: none; }
.head, .section-title, .actions, .bottom { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.head, .section-title { justify-content: space-between; }
.head { margin: 4px 0 18px; align-items: flex-end; }
.head > div:first-child { border-left: 4px solid var(--sec-hi); padding-left: 14px; }
.section-title { margin: 22px 0 10px; }
.bottom { margin-top: 22px; padding-top: 15px; border-top: 1px solid var(--border); justify-content: flex-end; }
.eyebrow { color: var(--sec); margin-bottom: 5px; }
.box, .panel { border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.box { padding: 16px; }
.box.narrow { max-width: 560px; display: grid; gap: 14px; }
.panel { overflow-x: auto; }
.entry { padding: 15px 0; border-bottom: 1px solid var(--border); }
.entry:last-child { border-bottom: 0; padding-bottom: 0; }
.entry p { margin-top: 7px; }
.note, .error { padding: 11px 14px; border-left: 3px solid #1a66c2; background: #e4eefb; border-radius: 0 6px 6px 0; font-size: 13px; }
.error { border-color: #b84a06; background: #fdebd9; }
.error::before { content: "◆ "; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 15px; border: 1px solid #bcc8da; color: var(--ink); background: var(--panel); border-radius: 7px; text-decoration: none; cursor: pointer; font-size: 13px; font-weight: 700; line-height: 1.45; }
.btn:hover { background: #e8eff9; border-color: #7f9cc4; }
.btn.primary { background: #ff8f2e; border-color: #e67510; color: #11284a; }
.btn.primary:hover { background: #ffa552; border-color: #e67510; }
.btn:disabled, .btn.disabled { opacity: .48; cursor: default; }

/* Tabs, tables, states */
.tabs { display: flex; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid var(--border); margin: 10px 0 18px; }
.tab { padding: 8px 2px; border-bottom: 3px solid transparent; color: var(--mute); font-weight: 700; font-size: 13px; text-decoration: none; }
.tab.on { border-color: var(--sec-hi); color: var(--ink); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { background: var(--sec-soft); color: #344054; font-size: 12px; font-weight: 800; white-space: nowrap; }
td, th { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
td { font-size: 13px; }
tr:last-child td { border: 0; }
tbody tr { position: relative; }
tbody tr:has(.rowtitle):hover td { background: #e6f0fd; }
tbody tr:has(.rowtitle):hover td:first-child { box-shadow: inset 4px 0 0 var(--sec-hi); }
.rowtitle { font-weight: 700; text-decoration: none; color: var(--ink); }
/* The link of a row covers the whole row. */
.rowtitle::after { content: ""; position: absolute; inset: 0; }
.rowtitle:hover { text-decoration: underline; }
.pill { display: inline-block; border-radius: 20px; padding: 3px 9px; background: #e9edf4; color: #45556b; font-size: 11px; font-weight: 650; white-space: nowrap; }
.pill.ok { background: #d3e4fb; color: #0f4687; }
.pill.warn { background: #ffdcb5; color: #7a3d00; }
.pill.off { background: #55627a; color: #fff; }
.pill.ok::before { content: "✓ "; }
.pill.warn::before { content: "◆ "; }
.pill.off::before { content: "✕ "; }

/* Sign-in */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px 15px; }
.login-box { width: min(400px, 100%); padding: 30px; border-top: 4px solid #ff8f2e; }
.login-box .brand { color: var(--pine); }
.login-box h1 { font-size: 22px; margin: 22px 0 14px; }
.login-box .btn { width: 100%; margin-top: 20px; }
.field { display: grid; gap: 5px; font-size: 13px; font-weight: 620; margin: 13px 0; }
.field input { width: 100%; color: var(--ink); border: 1px solid #bcc8da; border-radius: 6px; background: #fff; padding: 9px 10px; font-size: 14px; font-weight: 400; }
.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13px; }
.check input { accent-color: #1a66c2; width: 17px; height: 17px; margin: 1px 0 0; flex-shrink: 0; }

@media (min-width: 1024px) {
	.menu-toggle { display: none; }
}

@media (max-width: 760px) {
	.top { min-height: 52px; padding: 0 14px; }
	main.page { padding: 20px 15px; }
	.head { align-items: flex-start; }
	.box { padding: 15px; }
	.tabs { gap: 12px; }
	td, th { padding: 9px; }
	.bottom { justify-content: flex-start; }
}

/* Lists: filters, sorting, pages */
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--border); align-items: center; }
.filters .search { flex: 1 1 260px; max-width: 420px; }
.filters .choice { flex: 0 1 230px; min-width: 170px; }
th.num, td.num { text-align: right; }
.sort { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.sort:hover { text-decoration: underline; }
.sort .sign { font-size: 11px; color: var(--sec); }
.empty { padding: 26px 15px; color: var(--mute); text-align: center; }
.footrow { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 15px; border-top: 1px solid var(--border); font-size: 13px; color: var(--mute); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pgsize { width: 140px; margin-right: 8px; }
.pgnum { padding: 0 6px; }
.pg { min-width: 32px; height: 32px; border: 1px solid #bcc8da; border-radius: 6px; background: var(--panel); color: var(--ink); cursor: pointer; font-size: 15px; line-height: 1; }
.pg:hover:not(:disabled) { background: #e8eff9; border-color: #7f9cc4; }
.pg:disabled { opacity: .4; cursor: default; }
td .pill { margin-left: 8px; }
td > .pill:first-child { margin-left: 0; }

/* Detail pages */
.back { display: inline-block; font-size: 13px; text-decoration: none; }
.back:hover { text-decoration: underline; }
.between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.stack { display: grid; gap: 16px; align-content: start; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 18px; align-items: start; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 18px; margin: 0; }
.figures dt { font-size: 12px; color: var(--mute); }
.figures dd { margin: 2px 0 0; font-size: 16px; font-weight: 620; font-variant-numeric: tabular-nums; }
.sources { margin: 0; padding-left: 19px; display: grid; gap: 5px; font-size: 13px; overflow-wrap: anywhere; }
.sources .pill { margin-left: 8px; }
.price { width: 110px; display: inline-block; }
.price.wide { width: min(100%, 320px); display: block; }
.price input { text-align: right; }
.price.wide input { text-align: left; }
table.compact td, table.compact th { padding: 8px 10px; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wide table { min-width: 1320px; }
.wide td { white-space: nowrap; }
.prompt-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; background: #f6f8fc; border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; max-height: 70vh; overflow-y: auto; }
/* Text zones: a width that reads well, and a height the user changes by the lower right corner. */
.area { width: 100%; max-width: 860px; }
.area textarea { resize: vertical !important; min-height: 72px; line-height: 1.55; }
.stack > .q-input:not(.area), .stack > .q-select { max-width: 860px; }
.prompt-editor { width: 100%; max-width: 1000px; }
.example { margin-top: 6px; }
.example-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; max-height: 260px; overflow-y: auto; }
.article-edit textarea { font: 15px/1.6 var(--sans); }
.prompt-editor textarea { font: 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; }
.variable { display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.variable:last-child { border-bottom: 0; }
.variable code { font: 600 12.5px ui-monospace, "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; }
.variable .pill { margin-left: 8px; }
.answer { margin: 0; display: grid; gap: 10px; }
.answer dt { font: 700 12px/1.4 var(--sans); letter-spacing: 0; text-transform: uppercase; color: var(--mute); }
.answer dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.answer ul { margin: 0; padding-left: 19px; }
.article-title { font: 800 19px/1.3 var(--sans); color: var(--title); margin-bottom: 4px; }
.fold { border: 1px solid var(--border); border-radius: 8px; }
.filters.bare { border: 0; padding: 0 0 14px; }
.kicker { font: 700 12px/1.4 var(--sans); letter-spacing: 0; text-transform: uppercase; color: var(--mute); margin-bottom: 5px; }
.stat { font: 800 26px/1.1 var(--sans); letter-spacing: 0; color: #111827; }
h3 { font-size: 14px; font-weight: 800; color: var(--title); margin-bottom: 6px; }
.prose { white-space: pre-line; max-width: 78ch; }
.stack ul { margin: 0; padding-left: 19px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.working { display: flex; align-items: center; gap: 10px; }
.error .dim { margin-top: 5px; overflow-wrap: anywhere; }

@media (max-width: 760px) {
	.split, .grid3, .grid2 { grid-template-columns: minmax(0, 1fr); }
	.filters .search, .filters .choice { flex-basis: 100%; max-width: none; }
}

/* Writing: counts next to their button, sites, proposals of the tool, the text of an article. */
.rowacts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.count-field { width: 76px; }
.grow { flex: 1 1 220px; }
.strong { font-weight: 600; }
.source { padding: 9px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.proposal { background: var(--paper); overflow-wrap: anywhere; }
.article-body p { max-width: 76ch; margin: 0 0 12px; font: 15px/1.6 var(--sans); }
.working.note { display: flex; }
/* Comparison of settings: one line per setting to choose, one card per article written. */
.compare-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.compare-row > strong { min-width: 84px; }
.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; }
.compare-card { min-width: 0; }
.compare-card h4 { margin: 0 0 11px; font: 800 16px/1.3 var(--sans); color: var(--title); }
.compare-card .article-body p { font-size: 14px; }
/* Home: figures in tiles, a spending against its limit, messages on top. */
.alerts { display: grid; gap: 9px; }
.alerts:empty { display: none; }
.more { font-size: 13px; text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.alerts .more { margin-left: 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr)); gap: 12px; }
.tile { display: block; min-width: 0; min-height: 86px; padding: 14px 15px; border: 1px solid var(--border); border-left: 4px solid #2563eb; border-radius: 8px; background: var(--panel); color: var(--ink); text-decoration: none; }
a.tile:hover { border-color: #2563eb; box-shadow: 0 8px 24px rgba(37, 99, 235, .14); }
.tile.warn, a.tile.warn:hover { border-left-color: #f59e0b; }
.tile.warn .kicker::before { content: "◆ "; color: #b84a06; }
.tile .dim { margin-top: 5px; }
.tile .stat { font-variant-numeric: tabular-nums; }
.stat.small { font-size: 18px; overflow-wrap: anywhere; }
.meter { height: 9px; margin-top: 10px; border: 1px solid #9db2d1; border-radius: 6px; background: #eef2f8; overflow: hidden; }
.meter i { display: block; height: 100%; background: #1a66c2; }
.tile.warn .meter i { background: repeating-linear-gradient(45deg, #b84a06 0 6px, #e0661a 6px 12px); }
/* Opening of a vertical: the step bar, and one line per topic with its actions on the right. */
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.step { padding: 7px 13px; border: 1px solid var(--border); border-radius: 20px; background: var(--panel); color: var(--mute); font-size: 13px; font-weight: 700; text-decoration: none; }
a.step:hover { border-color: #7f9cc4; color: var(--ink); }
.step.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.topicline { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.topicline:last-child { border-bottom: 0; }
.topicline.edit { display: grid; background: var(--paper); }
.topicline .grow { min-width: 0; }
.tagrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gap-after { margin-bottom: 15px; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--mute); font-weight: 600; }
