/* ES Management — Client Portal
   Visual language taken from the approved portal design:
   ES red on black and warm paper greys, IBM Plex Sans for text,
   Source Serif 4 for titles and figures, 3–4px corners. */

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 600; font-stretch: 100%; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400 600; font-stretch: 100%; font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url('../fonts/source-serif-4-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url('../fonts/source-serif-4-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --red: #A50D0D;
  --red-dark: #8C0B0B;
  --red-tint: #FBF6F5;
  --ink: #111;
  --paper: #FAF9F8;
  --white: #fff;
  --line: #E6E4E1;
  --line-soft: #F0EEEC;
  --line-strong: #D6D3CF;
  --text-2: #3A3633;
  --text-3: #6B6663;
  --muted: #8A8580;
  --alert: #FF6B6B;           /* out-of-range value on black */
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --serif: 'Source Serif 4', Georgia, serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); font-family: var(--sans); color: var(--ink); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
input, select, button, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--red); text-decoration: none; }
a:hover { color: #7C0A0A; }
::placeholder { color: #9A9490; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
[hidden] { display: none !important; }

@keyframes esUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes esIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes esGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes esBarX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes esPop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes esSlide { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Type helpers ---------- */
.serif { font-family: var(--serif); }
.eyebrow { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; background: var(--white); }
.side { width: 236px; flex: none; background: var(--ink); color: #fff; display: flex; flex-direction: column; padding-bottom: 18px; position: sticky; top: 0; height: 100vh; }
.side__brand { background: var(--red); padding: 22px 20px 18px; }
.side__brand img { width: 112px; height: auto; display: block; margin-bottom: 14px; }
.side__brand span { font-size: 10.5px; letter-spacing: .14em; color: rgba(255,255,255,.7); }
.side__nav { display: flex; flex-direction: column; padding: 12px 10px; gap: 2px; }
.side__link { position: relative; display: block; padding: 11px 14px; border-radius: 3px; font-size: 13.5px; font-weight: 500; color: #fff; }
.side__link:hover { background: rgba(255,255,255,.08); color: #fff; }
.side__link.is-active { background: rgba(255,255,255,.1); }
.side__link.is-active::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; background: var(--red); }
.side__foot { margin-top: auto; padding: 16px 20px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: 11.5px; color: rgba(255,255,255,.5); line-height: 1.7; }
.side__foot button { background: none; border: 0; padding: 0; color: rgba(255,255,255,.75); cursor: pointer; font-size: 12.5px; }
.side__foot button:hover { color: #fff; text-decoration: underline; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.top__crumb { font-size: 11px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.top__title { font-family: var(--serif); font-weight: 700; font-size: 25px; line-height: 1.2; margin: 3px 0 0; }
.top__tools { display: flex; align-items: center; gap: 10px; }
.top__user { display: flex; align-items: center; gap: 9px; padding-left: 12px; border-left: 1px solid var(--line); font-size: 12.5px; line-height: 1.3; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.content { flex: 1; padding: 26px 32px 40px; background: var(--paper); overflow-x: auto; }
.stack { display: flex; flex-direction: column; gap: 18px; animation: esUp .4s var(--ease) both; }
.stack > * { min-width: 0; }

/* ---------- Controls ---------- */
.select, .input { border: 1px solid var(--line-strong); border-radius: 3px; padding: 8px 10px; font-size: 13px; background: #fff; min-height: 36px; }
.select { cursor: pointer; max-width: 260px; -webkit-appearance: none; appearance: none; padding-right: 36px; text-overflow: ellipsis;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23111' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 12px; }
.select:disabled { cursor: not-allowed; color: var(--muted); background-color: var(--line-soft); }
.input:hover, .select:hover { border-color: var(--ink); }
.input--wide { width: 100%; padding: 11px 12px; font-size: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: #fff; border: 1px solid var(--line-strong); border-radius: 3px; padding: 9px 14px; font-size: 12.5px; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn--primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn--primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn--ink { border-color: var(--ink); font-weight: 600; }
.btn--ink:hover { background: var(--ink); color: #fff; }
.btn--danger:hover { border-color: var(--red); color: var(--red); }
.btn--sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled, .btn:disabled:hover { opacity: .45; cursor: not-allowed; border-color: var(--line-strong); }
.btn--primary:disabled, .btn--primary:disabled:hover { background: var(--red); border-color: var(--red); color: #fff; }
.pill { border: 1px solid var(--line-strong); background: #fff; color: var(--text-2); border-radius: 999px; padding: 8px 16px; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; display: inline-block; }
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.label { display: block; font-size: 10.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-bottom: 5px; }
.field-error { color: var(--red); font-size: 12.5px; margin-top: 6px; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.card--pad { padding: 18px; }
.card--ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.card__title { font-family: var(--serif); font-weight: 600; font-size: 16px; margin: 0; }
.card__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.figure { font-family: var(--serif); font-weight: 700; font-size: 32px; margin: 6px 0 2px; line-height: 1.15; }
.figure small { font-family: var(--sans); font-weight: 400; font-size: 13px; color: var(--text-3); margin-left: 4px; }

.notice { border-left: 3px solid var(--ink); background: #fff; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 11px 14px; font-size: 13px; border-radius: 0 3px 3px 0; }
.notice--ok { border-left-color: var(--ink); }
.notice--error { border-left-color: var(--red); color: var(--red); }
.notice--preview { border-left-color: var(--line-strong); color: var(--text-3); font-size: 12.5px; }

/* ---------- Air quality: filter bar ---------- */
.filters { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
.filters__group { display: flex; flex-direction: column; }
.filters__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filters__custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters__custom .input { padding: 7px 8px; }

/* ---------- Air quality: live sensor ---------- */
.live { background: var(--ink); color: #fff; border-radius: 4px; padding: 20px; }
.live__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.live__title { font-family: var(--serif); font-weight: 600; font-size: 17px; margin: 0; }
.live__sub { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 3px; }
.live__state { display: flex; align-items: center; gap: 14px; }
.live__state-label { font-size: 10.5px; letter-spacing: .1em; color: rgba(255,255,255,.6); text-align: right; }
.live__state-value { font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.1; text-align: right; }
.live__state-value.is-flagged { color: var(--alert); }
.badge { font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 2px; letter-spacing: .04em; }
.badge--live { background: var(--red); color: #fff; }
.badge--stale { border: 1px solid rgba(255,255,255,.35); color: rgba(255,255,255,.75); }
.badge--outline { border: 1px solid #E7D3D3; color: var(--red); font-size: 9.5px; letter-spacing: .08em; padding: 3px 6px; }
.badge--off { border: 1px solid var(--line-strong); color: var(--muted); font-size: 9.5px; letter-spacing: .08em; padding: 3px 6px; }
/* Nine cells, device order. Hairlines are drawn by the cells so an unfilled grid slot stays black. */
.live__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.14); border-left: 1px solid rgba(255,255,255,.14); }
.live__cell { min-width: 0; padding: 14px 14px 15px; border-right: 1px solid rgba(255,255,255,.14); border-bottom: 1px solid rgba(255,255,255,.14); animation: esIn .5s ease both; }
@media (min-width: 1640px) { .live__grid { grid-template-columns: repeat(9, minmax(0, 1fr)); } }
@media (min-width: 1640px) { .live__grid--water { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .live__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .live__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.live__label { font-size: 10.5px; letter-spacing: .1em; color: rgba(255,255,255,.55); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live__reading { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; }
.live__value { font-family: var(--serif); font-weight: 700; font-size: 24px; }
.live__unit { font-size: 11px; color: rgba(255,255,255,.6); }
.live__note { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 3px; }
.live__cell.is-flagged .live__value, .live__cell.is-flagged .live__note { color: var(--alert); }
.live__empty { padding: 26px 4px 10px; color: rgba(255,255,255,.75); font-size: 13.5px; max-width: 60ch; }
.live__empty a { color: #fff; text-decoration: underline; }

/* ---------- Air quality: chart ---------- */
.aq-grid, .wq-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; }
.aq-side, .wq-side { display: flex; flex-direction: column; gap: 16px; }
.chart__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.chart__meta { font-size: 12px; color: var(--muted); }
.chart__plot { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 8px; height: 190px; border-bottom: 1px solid var(--line); }
.chart__plot.is-dense { gap: 3px; }
.chart__col { flex: 1; min-width: 0; max-width: 88px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.chart__val { font-size: 10.5px; color: var(--muted); white-space: nowrap; background: #fff; padding: 0 2px; position: relative; z-index: 1; }
.chart__bar { width: 100%; background: var(--ink); border-radius: 2px 2px 0 0; transform-origin: bottom; animation: esGrow .45s cubic-bezier(.2, .8, .3, 1) both; min-height: 2px; }
.chart__bar.is-flagged { background: var(--red); }
.chart__bar.is-empty { background: var(--line); animation: none; }
.chart__limit { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--red); pointer-events: none; }
.chart__limit span { position: absolute; right: 0; top: -15px; font-size: 10px; color: var(--red); background: #fff; padding: 0 3px; }
.chart__band { position: absolute; left: 0; right: 0; background: rgba(17,17,17,.05); border-top: 1px dashed var(--line-strong); border-bottom: 1px dashed var(--line-strong); pointer-events: none; }
.chart__axis { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.chart__axis.is-dense { gap: 3px; }
.chart__axis div { flex: 1; min-width: 0; max-width: 88px; text-align: center; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: visible; }
.chart__empty { height: 190px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); text-align: center; padding: 0 20px; }

/* ---------- Air quality: explorer ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; margin-top: 4px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--red); }
.crumbs span[aria-current] { color: var(--ink); font-weight: 500; }
.crumbs i { color: var(--line-strong); font-style: normal; }
.table-wrap { overflow-x: auto; padding: 0 18px 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 980px; }
.table th { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; font-weight: 400; text-align: right; padding: 12px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: bottom; }
.table th small { display: block; letter-spacing: 0; text-transform: none; font-size: 10.5px; color: #B0ABA6; margin-top: 2px; }
.table th:first-child, .table td:first-child { text-align: left; padding-left: 0; }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line-soft); text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tbody tr:hover { background: var(--red-tint); }
.table td.is-flagged { color: var(--red); font-weight: 600; }
.table__label { font-weight: 500; color: var(--ink); }
a.table__label:hover { color: var(--red); }
.table__sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.table__count { color: var(--ink) !important; }
.table-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.pager { display: flex; gap: 6px; align-items: center; }
.empty { padding: 34px 18px; text-align: center; color: var(--text-3); font-size: 13.5px; }
.empty strong { display: block; font-family: var(--serif); font-size: 17px; color: var(--ink); margin-bottom: 4px; }

/* ---------- Account ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { border-bottom: 2px solid transparent; color: var(--text-3); padding: 11px 16px; font-size: 13.5px; font-weight: 500; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.is-active { border-bottom-color: var(--red); color: var(--ink); }
.two-col { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.form-row { margin-bottom: 14px; }
.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.list th { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; font-weight: 400; text-align: left; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list td { padding: 13px 10px 13px 0; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.list td:last-child, .list th:last-child { text-align: right; padding-right: 0; }
.row-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row-actions form { display: inline; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.secret { background: var(--ink); color: #fff; border-radius: 4px; padding: 18px 20px; }
.secret dl { display: grid; grid-template-columns: max-content minmax(0, 1fr) max-content; gap: 10px 14px; align-items: center; margin: 14px 0 0; }
.secret dt { font-size: 10.5px; letter-spacing: .1em; color: rgba(255,255,255,.6); text-transform: uppercase; }
.secret dd { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.secret .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.secret .btn:hover { border-color: #fff; color: #fff; }

/* ---------- API docs ---------- */
.docs { max-width: 860px; font-size: 14px; line-height: 1.6; }
.docs h2 { font-family: var(--serif); font-weight: 700; font-size: 20px; margin: 34px 0 8px; padding-top: 22px; border-top: 1px solid var(--line); }
.docs h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.docs h3 { font-size: 14px; font-weight: 600; margin: 22px 0 6px; }
.docs p { margin: 0 0 10px; max-width: 72ch; }
.docs ul, .docs ol { margin: 0 0 12px; padding-left: 20px; max-width: 72ch; }
.docs li { margin-bottom: 4px; }
.docs code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: #F1EFEC; padding: 1px 5px; border-radius: 2px; }
.docs pre { background: var(--ink); color: #F4F2EF; padding: 14px 16px; border-radius: 4px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; margin: 0 0 14px; }
.docs pre code { background: none; padding: 0; color: inherit; }
.docs table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 0 0 14px; background: #fff; border: 1px solid var(--line); }
.docs th { text-align: left; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.docs td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.endpoint { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px; margin: 0 0 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; overflow-x: auto; white-space: nowrap; }
.endpoint b { background: var(--ink); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 2px; letter-spacing: .04em; }

/* ---------- Sign-in ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; }
.auth__side { background: var(--ink); color: #fff; display: flex; flex-direction: column; }
.auth__brand { background: var(--red); padding: 30px 40px 24px; }
.auth__brand img { width: 128px; height: auto; display: block; margin-bottom: 16px; }
.auth__brand span { font-size: 10.5px; letter-spacing: .14em; color: rgba(255,255,255,.7); }
.auth__pitch { padding: 48px 40px; margin-top: auto; margin-bottom: auto; }
.auth__pitch h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.18; margin: 0 0 16px; max-width: 16ch; }
.auth__pitch p { color: rgba(255,255,255,.65); font-size: 14px; line-height: 1.6; max-width: 38ch; margin: 0; }
.auth__legal { padding: 20px 40px 26px; border-top: 1px solid rgba(255,255,255,.14); font-size: 11.5px; color: rgba(255,255,255,.5); line-height: 1.7; }
.auth__main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--paper); }
.auth__form { width: 100%; max-width: 400px; animation: esUp .4s var(--ease) both; }
.auth__form h2 { font-family: var(--serif); font-weight: 700; font-size: 26px; margin: 0 0 4px; }
.auth__form > p { color: var(--text-3); font-size: 13.5px; margin: 0 0 26px; }
.auth__field { margin-bottom: 18px; }
.auth__password { position: relative; }
.auth__password .input { padding-right: 64px; }
.auth__password button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; font-size: 12px; color: var(--text-3); cursor: pointer; padding: 6px 8px; }
.auth__password button:hover { color: var(--ink); }
.captcha { display: flex; align-items: stretch; gap: 8px; margin-bottom: 8px; }
.captcha { background: var(--ink); border-radius: 3px; padding-left: 0; }
.captcha img { display: block; width: 250px; max-width: 70%; height: auto; aspect-ratio: 250 / 84; border-radius: 3px; flex: none; }
.captcha button { flex: 1; min-width: 0; background: transparent; color: #fff; border: 0; border-left: 1px solid rgba(255,255,255,.14); border-radius: 0; }
.captcha button:hover { color: #fff; background: rgba(255,255,255,.08); }
.auth__submit { width: 100%; padding: 13px; font-size: 14px; margin-top: 6px; }
.auth__hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- Error pages ---------- */
.oops { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 24px; }
.oops__box { max-width: 460px; border-left: 3px solid var(--red); padding: 6px 0 6px 24px; }
.oops__code { font-family: var(--serif); font-weight: 700; font-size: 54px; line-height: 1; }
.oops__box h1 { font-family: var(--serif); font-size: 22px; margin: 10px 0 6px; }
.oops__box p { color: var(--text-3); margin: 0 0 18px; }

/* ---------- Small screens ---------- */
@media (max-width: 1100px) {
  .aq-grid, .wq-grid { grid-template-columns: minmax(0, 1fr); }
  .aq-side, .wq-side { flex-direction: row; flex-wrap: wrap; }
  .aq-side > *, .wq-side > * { flex: 1 1 200px; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: stretch; padding-bottom: 0; flex-wrap: wrap; }
  .side__brand { padding: 12px 16px; display: flex; align-items: center; }
  .side__brand img { width: 56px; margin: 0; }
  .side__brand span { display: none; }
  .side__nav { flex-direction: row; flex: 1; overflow-x: auto; padding: 8px; align-items: center; }
  .side__link { white-space: nowrap; padding: 9px 12px; }
  .side__link.is-active::before { top: auto; left: 8px; right: 8px; bottom: 0; width: auto; height: 3px; }
  .side__foot { margin: 0; border-top: 0; padding: 0 16px; display: flex; align-items: center; }
  .side__foot div { display: none; }
  .top { padding: 14px 16px; }
  .top__title { font-size: 21px; }
  .content { padding: 18px 16px 32px; }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth__main { align-items: flex-start; }
  .auth__pitch, .auth__legal { display: none; }
  .auth__brand { padding: 18px 24px; display: flex; align-items: center; gap: 14px; }
  .auth__brand img { width: 64px; margin: 0; }
  .secret dl { grid-template-columns: 1fr; gap: 4px; }
  .secret dd { margin-bottom: 8px; }
}

/* ---------- Sidebar: modules not available yet ---------- */
.side__link.is-disabled { color: rgba(255,255,255,.32); cursor: not-allowed; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side__link.is-disabled:hover { background: none; color: rgba(255,255,255,.32); }
.side__link.is-disabled small { font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; border: 1px solid rgba(255,255,255,.18); border-radius: 2px; padding: 2px 5px; color: rgba(255,255,255,.38); }

/* ---------- Month popup (Air Quality) ---------- */
html.has-modal { overflow: hidden; }
.mmodal { padding: 0; border: 0; background: transparent; width: min(1020px, calc(100vw - 48px)); max-width: none; max-height: none; overflow: visible; color: var(--ink); }
.mmodal::backdrop { background: rgba(17,17,17,.52); backdrop-filter: blur(3px); }
.mmodal[open] { animation: mmodal-in .2s var(--ease); }
.mmodal[open]::backdrop { animation: mmodal-fade .2s ease; }
@keyframes mmodal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes mmodal-fade { from { opacity: 0; } to { opacity: 1; } }
.mmodal__panel { display: flex; flex-direction: column; height: min(680px, calc(100vh - 64px)); background: #fff; border-radius: 6px; border-top: 3px solid var(--red); box-shadow: 0 20px 50px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.08); overflow: hidden; }
.mmodal__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.mmodal__head .eyebrow { font-size: 9.5px; }
.mmodal__title { font-family: var(--serif); font-weight: 700; font-size: 18px; margin: 2px 0 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.mmodal__sub { font-family: var(--sans); font-weight: 400; font-size: 12px; color: var(--text-3); }
.mmodal__close { flex: none; width: 30px; height: 30px; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.mmodal__close:hover { background: var(--line-soft); color: var(--ink); }
.mmodal__close:focus { outline: none; }
.mmodal__close:focus-visible { box-shadow: 0 0 0 2px rgba(165,13,13,.25); }
.mmodal__body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; transition: opacity .15s; }
.mmodal__body.is-loading { opacity: .55; pointer-events: none; }
.mmodal__state { margin: auto; padding: 40px 20px; text-align: center; color: var(--text-3); font-size: 13px; }
.mmodal__state.is-error { color: var(--red); }
.mmodal__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 8px 20px; font-size: 12px; color: var(--text-3); background: var(--paper); border-bottom: 1px solid var(--line); }
.mmodal__meta strong { color: var(--ink); font-weight: 600; }
.mmodal__meta .is-flagged { color: var(--red); font-weight: 500; }
.mmodal__stats { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.mstat { padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 4px; background: #fff; min-width: 0; }
.mstat__label { font-size: 9.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mstat__value { font-family: var(--serif); font-weight: 700; font-size: 15.5px; margin: 3px 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mstat__value small { font-family: var(--sans); font-weight: 400; font-size: 10px; color: var(--muted); margin-left: 2px; }
.mstat__note { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mstat.is-flagged { border-color: #EBD3D1; background: var(--red-tint); }
.mstat.is-flagged .mstat__value { color: var(--red); }
.mstat__note.is-out { color: var(--red); }
.mmodal__table { flex: 1; min-height: 0; overflow: auto; padding: 0 20px; }
.mmodal__table .table { min-width: 860px; font-size: 12.5px; }
.mmodal__table .table thead th { position: sticky; top: 0; z-index: 1; background: #fff; box-shadow: inset 0 -1px 0 var(--line); padding: 10px 6px 8px; font-size: 9.5px; }
.mmodal__table .table th small { font-size: 9.5px; }
.mmodal__table .table td { padding: 7px 6px; }
.mmodal__table .table th:first-child, .mmodal__table .table td:first-child { padding-left: 0; }
.mmodal__table .table th:last-child, .mmodal__table .table td:last-child { padding-right: 0; }
.mmodal__table .table tbody tr:nth-child(even) { background: #FCFBFA; }
.mmodal__table .table tbody tr:hover { background: var(--red-tint); }
.mmodal__time { color: var(--muted); margin-left: 8px; font-size: 12px; }
.mmodal__foot { border-top: 1px solid var(--line); padding: 10px 20px; font-size: 11.5px; background: #fff; }
.mmodal__key { color: var(--red); font-weight: 600; }
@media (max-width: 980px) { .mmodal__stats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 600px) { .mmodal { width: 100vw; } .mmodal__panel { height: 100vh; border-radius: 0; } .mmodal__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mmodal__head, .mmodal__meta, .mmodal__stats, .mmodal__foot { padding-left: 14px; padding-right: 14px; } .mmodal__table { padding: 0 14px; } }

/* ---------- Confirm dialog (public/js/portal.js › ask) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cdialog { padding: 0; border: 0; background: transparent; width: min(440px, calc(100vw - 32px)); max-width: none; color: var(--ink); }
.cdialog::backdrop { background: rgba(17,17,17,.52); backdrop-filter: blur(3px); }
.cdialog[open] { animation: mmodal-in .18s var(--ease); }
.cdialog[open]::backdrop { animation: mmodal-fade .18s ease; }
.cdialog__panel { margin: 0; background: #fff; border-radius: 6px; border-top: 3px solid var(--ink); padding: 20px 22px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.08); }
.cdialog.is-danger .cdialog__panel { border-top-color: var(--red); }
.cdialog__title { font-family: var(--serif); font-weight: 700; font-size: 18px; margin: 0 0 8px; }
.cdialog__message { margin: 0 0 20px; font-size: 13.5px; line-height: 1.6; color: var(--text-3); overflow-wrap: anywhere; }
.cdialog__actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.btn--danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn--danger-solid:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }

/* ---------- Projects ---------- */
.pform { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pform__wide { grid-column: 1 / -1; }
.pform__hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.pform__modules { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.pform__modules legend { padding: 0; margin-bottom: 6px; }
.pform__modules label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.pform__modules input { accent-color: var(--red); width: 15px; height: 15px; }
.pform textarea.input { resize: vertical; min-height: 64px; font-family: inherit; }
.pdl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 0; padding: 4px 18px 10px; }
.pdl > div { padding: 10px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.pdl dt { font-size: 10.5px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-bottom: 3px; }
.pdl dd { margin: 0; font-size: 13.5px; }
.pdl__wide { grid-column: 1 / -1; }
.pmod { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.pmod:last-child { border-bottom: 0; }
.pinline { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pinline .input { flex: 1 1 160px; min-width: 0; }
.phead { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.list--rows tbody tr[data-status]:hover { background: var(--red-tint); }
@media (max-width: 600px) { .pform, .pdl { grid-template-columns: 1fr; } }

/* ---------- Green Mark ---------- */
.side__alert { margin-left: 8px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 1px 7px; vertical-align: 1px; }
.gm-kpi--overdue { border-color: var(--red); }
.gm-kpi--overdue .figure { color: var(--red); }
.gm-kpi--due .figure { color: var(--red); }
.gm-state { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .06em; padding: 3px 7px; border-radius: 2px; white-space: nowrap; }
.gm-state--overdue { background: var(--red); color: #fff; }
.gm-state--due { border: 1px solid var(--red); color: var(--red); }
.gm-state--ok { border: 1px solid var(--ink); color: var(--ink); }
.gm-state--none { border: 1px solid var(--line-strong); color: var(--muted); }
.gm-dots { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.gm-dot { font-size: 10px; padding: 2px 5px; border-radius: 2px; border: 1px solid var(--line); color: #B0ABA6; white-space: nowrap; }
.gm-dot.is-on { border-color: var(--ink); color: var(--ink); }
.gm-head { display: flex; justify-content: space-between; align-items: stretch; flex-wrap: wrap; overflow: hidden; }
.gm-head__main { padding: 18px; flex: 1 1 320px; }
.gm-head__rating { font-family: var(--serif); font-weight: 700; font-size: 28px; margin: 4px 0 2px; }
.gm-head__state { flex: 0 1 340px; padding: 18px 20px; background: var(--ink); color: #fff; display: flex; flex-direction: column; justify-content: center; }
.gm-head__state .eyebrow { color: rgba(255,255,255,.6); }
.gm-head__label { font-family: var(--serif); font-weight: 700; font-size: 26px; margin: 4px 0 2px; }
.gm-head__when { font-size: 12.5px; color: rgba(255,255,255,.72); }
.gm-head__cta { align-self: flex-start; margin-top: 12px; background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.gm-head__cta:hover { color: #fff; border-color: #fff; }
.gm-head--overdue .gm-head__state { background: var(--red); }
.gm-head--overdue .gm-head__when { color: rgba(255,255,255,.85); }
.gm-head--due .gm-head__label { color: var(--alert); }
.gm-count { display: inline-block; min-width: 18px; text-align: center; font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 5px; margin-left: 4px; }
.tabs a.is-active .gm-count { color: var(--ink); border-color: var(--ink); }
.gm-superseded td { color: var(--muted) !important; }
.gm-superseded td a { color: var(--muted); }
.gm-file { padding: 8px; }

/* ---------- My Information › Company ---------- */
.co-table { margin: 0; }
.co-table th, .co-table td { text-transform: none; letter-spacing: 0; font-size: 13.5px; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.co-table th { width: 52%; font-weight: 400; color: var(--text-2); white-space: normal; text-align: left; }
.co-table td { font-weight: 500; text-align: left !important; }
.co-table tr:last-child th, .co-table tr:last-child td { border-bottom: 0; }
.co-hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.co-calc { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.co-calc.is-off { color: var(--red); }

/* ---------- Green Mark › Energy consumption (3-year EUI sheet) ---------- */
.eui th, .eui td { font-size: 13px; }
.eui thead th { text-align: right; vertical-align: bottom; }
.eui thead th small { display: block; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 11px; margin-top: 2px; }
.eui tbody th { font-weight: 400; color: var(--text-2); text-transform: none; letter-spacing: 0; font-size: 13px; text-align: left; padding-right: 18px; }
.eui tbody td { text-align: right; }
.eui td.num .is-flagged { color: var(--red); font-weight: 600; }
.eui__key th, .eui__key td { font-weight: 600 !important; color: var(--ink) !important; background: var(--line-soft); }
.eui__flag { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--red); border: 1px solid #E7D3D3; border-radius: 2px; padding: 1px 5px; }
.eui__note { display: block; font-size: 11.5px; color: var(--muted); }
.ey-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; align-items: start; }
.ey { overflow: hidden; }
.ey__head { padding: 14px 16px 10px; border-bottom: 3px solid var(--ink); }
.ey--1 .ey__head { border-bottom-color: #A9C27A; }
.ey--2 .ey__head { border-bottom-color: #E8A97C; }
.ey--3 .ey__head { border-bottom-color: #8FAFD6; }
.ey__table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ey__table th, .ey__table td { padding: 3px 5px; border-bottom: 1px solid var(--line-soft); }
.ey__table thead th { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 400; text-align: right; padding-top: 10px; padding-bottom: 8px; }
.ey__table thead th:first-child, .ey__table tbody th, .ey__table tfoot th { text-align: left; padding-left: 16px; }
.ey__table tbody th { font-weight: 500; white-space: nowrap; width: 70px; }
.ey__in { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 2px; padding: 5px 4px; text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; min-width: 0; }
.ey__in:hover { border-color: var(--line-strong); }
.ey__in:focus { border-color: var(--ink); background: #fff; outline: none; }
.ey__in:disabled { color: var(--muted); }
.ey__table tr.is-future { opacity: .45; }
.ey__table tr.is-mismatch td .ey__in { background: var(--red-tint); }
.ey__warn { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; margin-left: 6px; vertical-align: 1px; }
.ey__table tfoot th, .ey__table tfoot td { font-weight: 600; background: var(--line-soft); padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ey__table tfoot td { text-align: right; padding-right: 14px; font-variant-numeric: tabular-nums; }
.ey__table tbody td:last-child, .ey__table thead th:last-child { padding-right: 14px; }
.ey__foot { padding: 14px 16px 16px; }
.ey__eui { font-family: var(--serif); font-weight: 700; font-size: 22px; padding-top: 6px; }

/* ---------- Green Mark › Energy charts (SVG) ---------- */
.gm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; }
.gm-legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: 3px; }
.gm-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 1px; background: var(--line-soft); border-top: 1px solid var(--line-soft); }
.gm-chart { margin: 0; padding: 14px 16px 10px; background: #fff; min-width: 0; }
.gm-chart figcaption { display: flex; flex-direction: column; gap: 1px; margin-bottom: 6px; }
.gm-chart figcaption b { font-family: var(--serif); font-size: 15px; }
.gm-chart figcaption span { font-size: 12px; color: var(--muted); }
.gm-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.gm-chart .g-grid { stroke: var(--line); stroke-width: 1; }
.gm-chart .g-ylab { font-size: 10.5px; fill: var(--muted); text-anchor: end; font-family: var(--sans); }
.gm-chart .g-xlab { font-size: 10.5px; fill: var(--muted); text-anchor: middle; font-family: var(--sans); }
.gm-chart .g-val { font-size: 11px; fill: var(--ink); text-anchor: middle; font-family: var(--sans); font-weight: 600; }
.gm-chart .g-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gm-chart .g-dot { stroke: #fff; stroke-width: 1.5; cursor: default; }
.gm-chart .g-dot:hover { r: 5; }
.gm-chart .g-band { fill: rgba(17,17,17,.06); }
.gm-chart .g-base { stroke: var(--ink); stroke-dasharray: 4 3; stroke-width: 1.2; }
.gm-chart .g-bar { transition: opacity .15s; }
.gm-chart .g-bar:hover { opacity: .85; }
@media (max-width: 900px) { .gm-charts { grid-template-columns: 1fr; } }

/* ---------- Green Mark › collapsible history ---------- */
.gm-history > summary { list-style: none; cursor: pointer; border-bottom: 0; }
.gm-history > summary::-webkit-details-marker { display: none; }
.gm-history[open] > summary { border-bottom: 1px solid var(--line); }
.gm-history > summary:hover .card__title { color: var(--red); }
.gm-history__toggle { flex: none; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 3px; position: relative; }
.gm-history__toggle::before { content: ''; position: absolute; left: 9px; top: 8px; width: 7px; height: 7px; border-right: 1.6px solid var(--ink); border-bottom: 1.6px solid var(--ink); transform: rotate(45deg); transition: transform .15s; }
.gm-history[open] .gm-history__toggle::before { transform: rotate(-135deg); top: 11px; }
.gm-chart .g-zero { stroke: var(--text-3); stroke-width: 1.2; }
.gm-charts--4 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.ey--wide .ey__table th, .ey--wide .ey__table td { padding-left: 3px; padding-right: 3px; }
.ey--wide .ey__table tbody th, .ey--wide .ey__table thead th:first-child, .ey--wide .ey__table tfoot th { padding-left: 12px; }
.ey__in.is-negative { color: var(--red); font-weight: 600; background: var(--red-tint); }
.ey--wide .ey__table { table-layout: fixed; }
.ey--wide .ey__table thead th:first-child, .ey--wide .ey__table tbody th { width: 66px; }
.ey--wide .ey__in { font-size: 12.5px; padding: 5px 2px; }
.ey--wide .ey__table thead th { font-size: 9.5px; letter-spacing: .03em; }
.ey--wide .ey__table tfoot td { font-size: 12.5px; padding-right: 4px; }
.ey--wide .ey__table tfoot th { font-size: 11px; line-height: 1.25; }

/* ---------- Green Mark › OSE Report ---------- */
.ose th, .ose td { font-size: 13px; text-transform: none; letter-spacing: 0; vertical-align: top; }
.ose thead th { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ose thead th:not(:first-child) { text-align: right; }
.ose thead th:last-child { text-align: left; padding-left: 14px; }
.ose tbody th { font-weight: 500; color: var(--ink); text-align: left; padding: 9px 12px 9px 18px; }
.ose tbody td { padding: 9px 10px; }
.ose tbody td:last-child { text-align: left; padding-left: 14px; padding-right: 18px; white-space: nowrap; }
.ose td.day { background: #FDF3EC; text-align: right; font-variant-numeric: tabular-nums; }
.ose td.night { background: #EEF3FA; text-align: right; font-variant-numeric: tabular-nums; }
.ose tr.is-na th, .ose tr.is-na td { color: var(--muted); }
.ose--heat tbody td.num { background: #EEF6E6; text-align: right; font-variant-numeric: tabular-nums; }
.ose__key th, .ose__key td { font-weight: 600 !important; }
.ose__calc { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.ose__calc.is-off { color: var(--red); }
.ose__calc small { display: block; font-size: 10px; color: var(--muted); }
.ose__notes { padding: 12px 18px 16px; font-size: 11.5px; color: var(--text-3); line-height: 1.6; border-top: 1px solid var(--line); }
.ose__verdict { margin: 0 18px 16px; padding: 10px 12px; border-radius: 3px; font-size: 13px; font-weight: 500; }
.ose__verdict.is-ok { background: #EEF6E6; color: #3F6B1E; }
.ose__verdict.is-bad { background: var(--red-tint); color: var(--red); }
.ose__viewer { display: block; width: 100%; height: 760px; border: 0; border-top: 1px solid var(--line); background: #525659; }
.ose__image { padding: 16px; text-align: center; background: var(--line-soft); }
.ose__image img { max-width: 100%; height: auto; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.ose__attach { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 18px; border-radius: 6px; background: #8DC254; color: #fff; cursor: pointer; text-align: center; min-width: 220px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.ose__attach span { font-weight: 600; font-size: 13.5px; }
.ose__attach small { font-size: 11px; color: rgba(255,255,255,.85); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ose__attach input { font-size: 11.5px; color: #fff; max-width: 220px; }
.ose__attach:hover { background: #7DB443; }
.ose--form td.day, .ose--form td.night { padding: 3px 6px; }
.ose--form .ey__in { background: rgba(255,255,255,.6); border-color: rgba(0,0,0,.06); }
.ose--form .ey__in:focus { background: #fff; }
.ose--heat.ose--form tbody td:nth-child(2) { background: #EEF6E6; padding: 3px 6px; width: 140px; }
.ose thead th:first-child { padding-left: 18px; }
.ose--form td.day, .ose--form td.night { width: 112px; }
.ose--heat tbody td:last-child { white-space: normal; font-size: 12px; min-width: 90px; }
.ose--heat tbody th { padding-right: 8px; }

/* ───────── Project details drawn from My Information ───────── */
.pfrom { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--text-3); background: var(--line-soft); vertical-align: 1px; white-space: nowrap; }
.pfill { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 8px; font-size: 12.5px; color: var(--text-3); }
.pdl--tight { padding-top: 4px; }

/* ───────── Green Mark: Project Details from My Information ───────── */
.gm-pd > summary { list-style: none; cursor: pointer; }
.gm-pd > summary::-webkit-details-marker { display: none; }
.gm-pd[open] > summary { border-bottom: 1px solid var(--line); }
.gm-pd > summary:hover .card__title { color: var(--red); }
.gm-pd__toggle { flex: none; width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 3px; position: relative; }
.gm-pd__toggle::before { content: ''; position: absolute; left: 9px; top: 8px; width: 7px; height: 7px; border-right: 1.6px solid var(--ink); border-bottom: 1.6px solid var(--ink); transform: rotate(45deg); transition: transform .15s; }
.gm-pd[open] .gm-pd__toggle::before { transform: rotate(-135deg); top: 11px; }
.gm-pd__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; padding-bottom: 8px; }
.gm-pd__table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.gm-pd__grid > .gm-pd__table + .gm-pd__table { border-left: 1px solid var(--line-soft); }
.gm-pd__table caption { caption-side: top; text-align: left; padding: 14px 18px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.gm-pd__table th, .gm-pd__table td { padding: 8px 18px; font-size: 13px; }
.gm-pd__table th { width: 55%; }
.gm-pd__table td { overflow-wrap: anywhere; }
.gm-pd__table .co-calc { display: inline; margin-left: 6px; }

/* ───────── OSE entry page (/ose) ───────── */
.ose-app { background: var(--paper); min-height: 100vh; }
.ose-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 10px 28px; background: var(--ink); color: #fff; }
.ose-bar__brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.ose-bar__brand img { background: var(--red); padding: 4px 6px; border-radius: 2px; }
.ose-bar__brand span { font-size: 11px; font-weight: 600; letter-spacing: .14em; }
.ose-bar__user { display: flex; align-items: center; gap: 12px; font-size: 12.5px; line-height: 1.3; }
.ose-bar__user span { color: #A9A49F; }
.ose-bar__user form { margin: 0; }
.ose-bar__btn { background: transparent; color: #fff; border-color: #4A4643; }
.ose-bar__btn:hover { border-color: #fff; }
.ose-main { max-width: 1280px; margin: 0 auto; padding: 26px 28px 60px; }
.ose-status { display: inline-block; padding: 2px 7px; border: 1px solid currentColor; border-radius: 2px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; white-space: nowrap; }
.ose-status--pending { color: #9A6B00; background: #FFF8E6; }
.ose-status--accepted { color: #1E6B3A; background: #EEF8F1; }
.ose-status--rejected { color: var(--red); background: var(--red-tint); }
.ose-note { font-style: italic; max-width: 360px; white-space: normal; }
.ose-review { border-color: #E9C46A; background: #FFFCF3; }
.ose-review__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.ose-review__row form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.ose-review__row .input { min-width: 240px; }

/* ── Green Mark score card ── */
.sc-btn::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; border-radius: 2px;
  background: #1D6F42 linear-gradient(transparent 45%, rgba(255,255,255,.55) 45%, rgba(255,255,255,.55) 55%, transparent 55%); }
.sc-head { display: flex; justify-content: space-between; align-items: stretch; flex-wrap: wrap; overflow: hidden; }
.sc-head__main { padding: 20px 22px; flex: 1 1 420px; }
.sc-head__title { font-family: var(--serif, inherit); font-size: 22px; margin: 4px 0 6px; }
.sc-head__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.sc-head__meter { flex: 0 0 240px; background: var(--ink); color: #fff; padding: 20px 22px; display: flex; flex-direction: column; justify-content: center; }
.sc-head__meter.is-complete { background: #2F6B33; }
.sc-head__big { font-size: 40px; font-weight: 700; line-height: 1; }
.sc-head__big small { font-size: 18px; opacity: .6; font-weight: 500; }
.sc-head__lbl { font-size: 12.5px; margin: 8px 0 10px; opacity: .85; }
.sc-bar { height: 4px; background: rgba(255,255,255,.18); border-radius: 2px; overflow: hidden; }
.sc-bar span { display: block; height: 100%; background: var(--red); }
.sc-head__meter.is-complete .sc-bar span { background: #fff; }
.sc-check { padding: 0 18px 14px; }
.sc-check__group { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 14px 0 4px; font-weight: 600; }
.sc-check__row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--line); color: var(--ink); font-size: 13.5px; }
.sc-check__row:hover { background: var(--paper, #F7F6F4); }
.sc-check__label { flex: 1; min-width: 0; }
.sc-check__go { color: var(--text-3); }
.sc-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; border: 2px solid var(--red); }
.sc-dot.is-ok { background: #3F8A44; border-color: #3F8A44; }
.sc-form__group { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin: 6px 0 8px; font-weight: 600; }
