/* The portal's one stylesheet: IBM Plex, a cool grey ground, one teal accent. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --ink: #111418;
  --muted: #4b5563;
  --line: #d9dde3;
  --line-soft: #eef0f3;
  --field: #c4cad2;
  --accent: #0b5f66;
  --accent-ink: #ffffff;
  --accent-soft: #eef6f6;
  --danger: #b42318;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1215;
    --surface: #171b20;
    --ink: #eef1f4;
    --muted: #a3acb8;
    --line: #2c333b;
    --line-soft: #222830;
    --field: #3a434d;
    --accent: #5cc3c9;
    --accent-ink: #0f1215;
    --accent-soft: #15302f;
    --danger: #f97066;
  }
}
* {
  box-sizing: border-box;
}
html {
  color-scheme: light dark;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 "IBM Plex Sans", system-ui, sans-serif;
}
a {
  color: var(--accent);
}
[hidden] {
  display: none !important;
}

.top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.brand {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.top-right {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.narrow {
  max-width: 440px;
  margin: 0 auto;
  padding: 48px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 16px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 600;
}
h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
p {
  margin: 0;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 14px;
}
.tiny {
  font-size: 13px;
}
.mono {
  font-family: var(--mono);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card.dashed {
  background: transparent;
  border-style: dashed;
  padding: 16px;
  gap: 6px;
}
.label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.big {
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 500;
  line-height: 1.1;
}
.big .unit {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
}

.btn {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 500 16px "IBM Plex Sans", sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.btn.small {
  min-height: 44px;
  padding: 0 16px;
  font-size: 14px;
}
.btn.danger {
  border-color: var(--danger);
  color: var(--danger);
}
.btn:disabled {
  opacity: .55;
  cursor: default;
}
.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.row.between {
  justify-content: space-between;
}

.amounts {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.amounts legend {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 0;
}
.amounts label {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--field);
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
}
.amounts input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.amounts label:has(input:checked) {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.amounts label:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.other {
  display: flex;
  align-items: center;
  gap: 8px;
}
.other input {
  width: 140px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 500 16px var(--mono);
}

.notice {
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 14px;
}
.notice.error {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.list li {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line-soft);
}
th.num,
td.num {
  text-align: right;
  font-family: var(--mono);
}
td.plus,
.tick {
  color: var(--accent);
}

@media (max-width: 520px) {
  .amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .top {
    padding: 16px;
  }
}
