/* MySmartQR client portal. Black and white, square corners: the visual language of a QR code itself. */
:root {
	--ink: #000;
	--paper: #fff;
	--grey: #5c5c5c;
	--rule: #d6d6d6;
	--wash: #f4f4f4;
	--sans: "Helvetica Neue", Helvetica, Arial, "Noto Sans", sans-serif;
	--mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
code { font: 13px/1.4 var(--mono); word-break: break-all; }
h1, h2 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
h2 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 12px; }
.muted { color: var(--grey); }
.small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Bar */
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px clamp(16px, 4vw, 40px); border-bottom: 2px solid var(--ink); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 24px; height: 24px; border: 4px solid var(--ink); position: relative; flex: none; }
.mark::after { content: ""; position: absolute; inset: 3px; background: var(--ink); }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand-by { color: var(--grey); font-size: 14px; }
.who { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.who span { font-weight: 600; }
.preview { font-weight: 600; }

/* Layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 56px; min-height: 60vh; }
.head { margin-bottom: 20px; }
.head .muted { margin: 6px 0 0; }
.back { margin-bottom: 14px; font-size: 15px; }
.back a::before { content: "\2190\00a0"; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 18px clamp(16px, 4vw, 40px); border-top: 1px solid var(--ink); font-size: 14px; color: var(--grey); }

/* Buttons and tags */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font: 600 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.copy { border: 1px solid var(--ink); background: var(--paper); font: 600 12px/1 var(--sans); padding: 5px 8px; cursor: pointer; vertical-align: middle; }
.copy:hover { background: var(--ink); color: var(--paper); }
.tag { display: inline-block; font: 600 12px/1 var(--sans); padding: 5px 8px; border: 1.5px solid var(--ink); letter-spacing: 0.02em; vertical-align: middle; }
.tag.is-active { background: var(--ink); color: var(--paper); }
.tag.is-expired { border-style: dashed; }
.is-alert { font-weight: 700; }
.is-alert::before { content: "\25A0\00a0"; }

/* Login and messages */
.login, .message { max-width: 420px; margin: 24px auto; }
.message { max-width: 560px; }
.login h1, .message h1 { margin-bottom: 8px; }
.login form { margin-top: 24px; }
.login label { display: block; font-weight: 600; margin: 14px 0 6px; }
.login input[type=text], .login input[type=password] { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 0; font: 16px var(--sans); background: var(--paper); }
.login .check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 16px 0 20px; }
.login .btn { width: 100%; }
.error { border: 2px solid var(--ink); padding: 10px 12px; font-weight: 600; }
.picker { list-style: none; padding: 0; margin: 20px 0; border-top: 1px solid var(--ink); }
.picker li { border-bottom: 1px solid var(--ink); }
.picker a { display: block; padding: 12px 0; font-weight: 600; text-decoration: none; }
.picker a:hover { text-decoration: underline; }

/* Figures */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0 0 28px; border-top: 2px solid var(--ink); }
.figures div { padding: 14px 16px 14px 0; }
.figures dt { color: var(--grey); font-size: 14px; }
.figures dd { margin: 2px 0 0; font-size: 34px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* Code list */
.search input { width: 100%; max-width: 360px; min-height: 44px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 0; font: 16px var(--sans); margin-bottom: 16px; }
.codes { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.code { display: grid; grid-template-columns: 96px minmax(0, 1fr) 120px auto; gap: 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--ink); }
.thumb { display: block; }
.qr { display: block; }
.qr svg { display: block; width: 100%; height: auto; }
.code .qr { width: 96px; height: 96px; }
.code h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.code h2 a { text-decoration: none; }
.code h2 a:hover { text-decoration: underline; }
.code p { margin: 0 0 4px; font-size: 14px; }
.opens { color: var(--grey); overflow-wrap: anywhere; }
.count { display: flex; flex-direction: column; text-decoration: none; text-align: right; }
.count strong { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.count span { font-size: 14px; }
.count small { color: var(--grey); font-size: 13px; }

/* Code detail */
.detail { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; margin-bottom: 32px; }
.big .qr { border: 1px solid var(--rule); }
.dl { display: grid; gap: 8px; margin: 14px 0 8px; }
.facts { margin: 0; border-top: 2px solid var(--ink); }
.facts div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt { color: var(--grey); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* Panels, chart, tables */
.panel { border-top: 2px solid var(--ink); padding: 16px 0 8px; margin: 0 0 24px; }
.panel h2 { margin-bottom: 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.range { display: flex; border: 2px solid var(--ink); }
.range a { padding: 6px 12px; text-decoration: none; font-size: 14px; font-weight: 600; }
.range a + a { border-left: 2px solid var(--ink); }
.range a[aria-current] { background: var(--ink); color: var(--paper); }
.chart { width: 100%; height: auto; display: block; }
.chart rect { fill: var(--ink); }
.chart rect.hit { fill: transparent; }
.chart g:hover rect:not(.hit) { fill: var(--grey); }
.chart line { stroke: var(--ink); stroke-width: 1; }
.chart text { font: 12px var(--sans); fill: var(--grey); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 32px; }
.bars { width: 100%; border-collapse: collapse; font-size: 14px; }
.bars td { padding: 5px 0; }
.bars td:first-child { width: 40%; padding-right: 10px; }
.bars .bar svg { display: block; width: 100%; height: 8px; background: var(--wash); }
.bars .bar rect { fill: var(--ink); }
.num { text-align: right; width: 44px; font-variant-numeric: tabular-nums; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; border-bottom: 2px solid var(--ink); padding: 8px 12px 8px 0; white-space: nowrap; }
td { border-bottom: 1px solid var(--rule); padding: 8px 12px 8px 0; }

@media (max-width: 760px) {
	.code { grid-template-columns: 72px minmax(0, 1fr); gap: 12px 16px; }
	.code .qr { width: 72px; height: 72px; }
	.count { grid-column: 2; flex-direction: row; align-items: baseline; gap: 6px; text-align: left; }
	.count strong { font-size: 20px; }
	.view { grid-column: 2; justify-self: start; }
	.detail { grid-template-columns: 1fr; gap: 24px; }
	.big { max-width: 300px; }
	.facts div { grid-template-columns: 1fr; gap: 2px; }
	.figures dd { font-size: 28px; }
}
@media print {
	.bar nav, .dl, .copy, .search, .view, .range { display: none; }
}
