:root {
  --ink: #171816;
  --ink-soft: #292b27;
  --paper: #f1eee6;
  --card: #faf8f2;
  --muted: #74766f;
  --line: #d4d1c8;
  --orange: #f25b2b;
  --orange-soft: #ffdccc;
  --volt: #c8f342;
  --blue: #5da9ff;
  --shadow: 0 22px 70px rgba(23,24,22,.09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
button, input, select { font: inherit; }
button { color: inherit; }

.site-header,
.hero,
.entry-section,
.history-section,
footer {
  width: min(1220px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23,24,22,.18);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-size: .75rem; font-weight: 900; letter-spacing: .16em; }
.brand-icon { display: flex; align-items: end; gap: 3px; width: 28px; height: 28px; padding: 6px; border-radius: 7px; background: var(--ink); }
.brand-icon i { display: block; width: 4px; border-radius: 2px; background: var(--volt); }
.brand-icon i:nth-child(1) { height: 7px; }
.brand-icon i:nth-child(2) { height: 12px; }
.brand-icon i:nth-child(3) { height: 16px; }
.privacy { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 8px 10px; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: .72rem; font-weight: 650; }
.privacy:hover { background: rgba(255,255,255,.65); }
.privacy > span { width: 7px; height: 7px; border-radius: 50%; background: #3aa878; box-shadow: 0 0 0 4px rgba(58,168,120,.12); }
.page-switch { display: flex; gap: 5px; padding: 5px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; box-shadow: 0 7px 20px rgba(23,24,22,.09); }
.page-switch button { border: 0; border-radius: 999px; padding: 10px 20px; background: transparent; color: var(--ink); cursor: pointer; font-size: .82rem; font-weight: 850; }
.page-switch button.active { background: var(--orange); color: #fff; }

.hero {
  min-height: 630px;
  display: grid;
  grid-template-columns: 1.45fr .55fr;
  grid-template-rows: 1fr auto;
  gap: 60px;
  padding: 100px 0 52px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 460px;
  height: 460px;
  right: 2%;
  top: 7%;
  border: 96px solid rgba(200,243,66,.25);
  border-radius: 50%;
}
.hero-title { align-self: center; }
.kicker { margin: 0 0 16px; color: var(--orange); font-size: .7rem; font-weight: 850; letter-spacing: .17em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(4rem, 8.5vw, 8.3rem); line-height: .86; letter-spacing: -.083em; }
h1 em { color: var(--orange); font-style: italic; font-weight: 460; }
.hero-aside { align-self: center; padding-top: 30px; }
.hero-aside > p { color: var(--muted); font-size: .98rem; line-height: 1.65; }
.year-control { margin-top: 34px; }
.year-control > label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .68rem; font-weight: 760; text-transform: uppercase; letter-spacing: .1em; }
.year-control > div { display: flex; border-bottom: 2px solid var(--ink); }
.year-control input { width: 95px; border: 0; outline: 0; padding: 12px 4px; background: transparent; font-size: 1.25rem; font-weight: 850; }
.year-control button { flex: 1; border: 0; padding: 12px 0; background: transparent; cursor: pointer; text-align: right; font-size: .76rem; font-weight: 800; }
.year-control button span { margin-left: 7px; color: var(--orange); font-size: 1.1rem; }
.inline-message { min-height: 1.2em; margin: 7px 0 0; color: #ad4030; font-size: .7rem; }

.stats { grid-column: 1 / -1; display: grid; grid-template-columns: .8fr .8fr .9fr 1.5fr; border-top: 1px solid rgba(23,24,22,.2); border-bottom: 1px solid rgba(23,24,22,.2); }
.stats article { min-width: 0; padding: 22px 25px; border-right: 1px solid rgba(23,24,22,.2); }
.stats article:first-child { padding-left: 0; }
.stats article:last-child { border-right: 0; }
.stats span { display: block; margin-bottom: 10px; color: var(--muted); font-size: .68rem; }
.stats strong { display: block; overflow: hidden; font-size: 1.4rem; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.stats strong small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.accent-stat strong { color: var(--orange); font-size: 1rem; }

.entry-section { margin-top: 30px; padding: 68px 64px 74px; border-radius: 34px; background: var(--ink); color: #f6f3eb; box-shadow: 0 30px 80px rgba(23,24,22,.17); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; }
.section-number { display: inline-block; margin-bottom: 10px; color: var(--orange); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .7rem; font-weight: 850; }
.section-head h2 { margin-bottom: 0; font-size: clamp(2.5rem, 5vw, 5.2rem); line-height: .92; letter-spacing: -.065em; }
.section-head h2 span { color: var(--orange); font-weight: 470; font-style: italic; }
.year-tabs-wrap { display: flex; align-items: center; gap: 10px; max-width: 48%; }
.year-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding: 4px; }
.year-tab, .icon-button { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: transparent; color: #b5bcb6; cursor: pointer; }
.year-tab { padding: 9px 14px; font-size: .74rem; font-weight: 770; }
.year-tab[aria-selected="true"] { border-color: var(--volt); background: var(--volt); color: var(--ink); }
.icon-button { flex: 0 0 auto; width: 34px; height: 34px; font-size: 1.2rem; }
.entry-note { display: flex; justify-content: space-between; gap: 25px; margin: 40px 0 20px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.13); border-bottom: 1px solid rgba(255,255,255,.13); color: #89918c; font-size: .7rem; }
.entry-note span::before { content: "●"; margin-right: 7px; color: #4cbd84; }
.entry-note p { margin: 0; }
.entry-note b { color: #b9bfbb; }
.entry-note button { border: 0; padding: 0; background: transparent; color: var(--volt); cursor: pointer; font-size: .7rem; font-weight: 800; }
.entry-actions { display: flex; align-items: center; gap: 15px; }
.entry-note .save-values { border-radius: 999px; padding: 9px 14px; background: var(--volt); color: var(--ink); }

.performance-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.performance-field { display: grid; grid-template-columns: 1fr minmax(130px, .55fr); align-items: center; min-width: 0; padding: 17px 18px; border: 1px solid rgba(255,255,255,.12); border-radius: 15px; background: rgba(255,255,255,.045); transition: border-color .18s, background .18s; }
.performance-field:focus-within { border-color: rgba(200,243,66,.6); background: rgba(255,255,255,.075); }
.discipline-name { display: flex; align-items: center; min-width: 0; gap: 12px; font-size: .82rem; font-weight: 760; }
.discipline-order { display: grid; place-items: center; flex: 0 0 auto; width: 25px; height: 25px; border-radius: 50%; background: rgba(255,255,255,.08); color: #9da49f; font-family: ui-monospace, monospace; font-size: .62rem; }
.value-input { display: flex; align-items: baseline; gap: 8px; border-bottom: 1px solid rgba(255,255,255,.32); }
.value-input input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 5px 0 7px; background: transparent; color: var(--volt); font-size: 1.35rem; font-weight: 820; text-align: right; font-variant-numeric: tabular-nums; }
.value-input input::placeholder { color: #686d69; }
.value-input span { min-width: 36px; color: #979e99; font-size: .68rem; font-weight: 750; }

.history-section { padding: 112px 0 100px; }
.history-head { margin-bottom: 44px; }
.view-switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.35); }
.view-switch button { border: 0; border-radius: 999px; padding: 9px 15px; background: transparent; color: var(--muted); cursor: pointer; font-size: .72rem; font-weight: 780; }
.view-switch button.active { background: var(--ink); color: #fff; }
.history-controls { display: flex; align-items: center; gap: 10px; }
.toggle-history { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 15px; background: var(--card); color: var(--ink); cursor: pointer; font-size: .72rem; font-weight: 780; }
.toggle-history span { color: var(--orange); font-size: 1rem; line-height: .7; }
#history-content[hidden] { display: none; }
.comparison-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow); }
.comparison-table { width: 100%; min-width: 710px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.comparison-table th, .comparison-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: right; }
.comparison-table thead th { position: sticky; top: 0; background: #e7e4dc; color: var(--muted); font-size: .7rem; letter-spacing: .05em; }
.comparison-table th:first-child, .comparison-table td:first-child { position: sticky; left: 0; z-index: 1; min-width: 170px; text-align: left; background: var(--card); }
.comparison-table thead th:first-child { z-index: 2; background: #e7e4dc; }
.comparison-table tbody tr:last-child td { border-bottom: 0; }
.comparison-table tbody tr:hover td { background: #f5f2ea; }
.comparison-table tbody tr:hover td:first-child { background: #f5f2ea; }
.discipline-cell strong { display: block; font-size: .78rem; }
.discipline-cell span { color: var(--muted); font-size: .63rem; }
.result-cell { min-width: 120px; }
.result-main { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 790; }
.best-mark { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.delta { display: block; margin-top: 4px; color: var(--muted); font-size: .62rem; }
.delta.up { color: #16805b; font-weight: 740; }
.empty-value { color: #aaa9a3; }

.trends-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.trend-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.trend-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.trend-head h3 { margin: 0; font-size: .9rem; }
.trend-head span { color: var(--muted); font-size: .65rem; }
.trend-chart { display: block; width: 100%; height: 128px; margin-top: 16px; overflow: visible; }
.trend-line { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend-area { fill: url(#trend-gradient); opacity: .15; }
.trend-point { fill: var(--paper); stroke: var(--orange); stroke-width: 3; }
.trend-labels { display: flex; justify-content: space-between; margin-top: 5px; color: var(--muted); font-size: .6rem; }
.no-trend { min-height: 128px; display: grid; place-items: center; margin-top: 16px; border-radius: 12px; background: #f0ede5; color: var(--muted); font-size: .72rem; text-align: center; }
.legend { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 18px; color: var(--muted); font-size: .66rem; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend span:last-child { margin-left: auto; }
.legend i { width: 7px; height: 7px; border-radius: 50%; }
.legend-best { background: var(--orange); }
.legend-up { background: #16805b; }

.badge-page { width: min(1220px, calc(100% - 48px)); margin-inline: auto; }
.badge-hero { min-height: 520px; padding: 90px 0 55px; }
.badge-hero h1 { font-size: clamp(3.8rem, 8vw, 7.6rem); }
.badge-profile { display: grid; grid-template-columns: 220px 220px 1fr; gap: 12px; margin-top: 55px; padding: 22px; border-radius: 20px; background: var(--ink); color: #fff; }
.badge-profile label { display: flex; flex-direction: column; gap: 8px; color: #aeb4af; font-size: .7rem; font-weight: 780; text-transform: uppercase; letter-spacing: .08em; }
.badge-profile input[type="number"], .badge-profile select { width: 100%; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; padding: 11px; background: #2a2c28; color: #fff; }
.badge-profile label small { min-height: 1.2em; color: var(--volt); font-size: .68rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.badge-profile .check-label { flex-direction: row; align-items: center; justify-content: end; gap: 10px; color: #fff; text-transform: none; letter-spacing: 0; }
.badge-profile input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--volt); }
.badge-result-section { padding: 60px 0 100px; }
.badge-result { display: flex; flex-direction: column; align-items: start; padding-bottom: 35px; border-bottom: 1px solid var(--line); }
.badge-result span, .badge-result small { color: var(--muted); font-size: .75rem; }
.badge-result strong { margin: 9px 0; color: var(--orange); font-size: clamp(2.5rem, 6vw, 5.5rem); letter-spacing: -.06em; }
.badge-selection-note { max-width: 760px; margin: 26px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.badge-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 28px; }
.badge-group-card { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.badge-group-card > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: .68rem; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; }
.badge-group-card > strong { display: block; min-height: 42px; font-size: 1.12rem; }
.badge-group-card > select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 36px 9px 11px; background: #fff; color: var(--ink); font-size: .9rem; font-weight: 760; }
.badge-group-card > small { display: block; margin-top: 11px; color: var(--muted); font-size: .72rem; }
.badge-group-card > small b { color: var(--ink); }
.badge-thresholds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 14px; }
.badge-thresholds i { padding: 8px 5px; border-radius: 8px; background: #efede6; color: var(--muted); font-size: .62rem; font-style: normal; text-align: center; }
.badge-thresholds b { display: block; margin-top: 3px; color: var(--ink); font-size: .76rem; }
.badge-group-card > em { align-self: start; margin-top: 13px; border-radius: 999px; padding: 5px 9px; background: #e7e4dc; font-size: .68rem; font-style: normal; font-weight: 800; }
.badge-warning { padding: 14px 17px; border-radius: 12px; background: var(--orange-soft); font-size: .78rem; }
.badge-table-wrap { margin-top: 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.badge-table { width: 100%; min-width: 650px; border-collapse: collapse; }
.badge-table th, .badge-table td { padding: 15px 18px; border-bottom: 1px solid var(--line); text-align: left; font-size: .76rem; }
.badge-table th { color: var(--muted); background: #e7e4dc; font-size: .67rem; }
.badge-table td span { display: block; color: var(--muted); font-size: .63rem; }
.badge-table tbody tr:last-child td { border: 0; }
.level-1 { color: #946638; }.level-2 { color: #737b82; }.level-3 { color: #bb8112; }
.source-note { max-width: 800px; margin: 20px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.55; }

.dialog-close { padding: 12px 14px 0; text-align: right; }
.dialog-close button { border: 0; background: transparent; cursor: pointer; font-size: 1.4rem; }
.discipline-dialog-content { padding: 0 30px 30px; }
.discipline-list { max-height: 300px; margin: 20px 0; padding: 0; overflow-y: auto; list-style: none; border-top: 1px solid var(--line); }
.discipline-list li { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .78rem; }
.discipline-list button { border: 0; background: transparent; color: var(--orange); cursor: pointer; font-size: .7rem; font-weight: 780; }
.add-discipline { display: grid; gap: 9px; padding: 18px; border-radius: 14px; background: #ece9e1; }
.add-discipline h3 { margin: 0 0 4px; font-size: .85rem; }
.add-discipline input, .add-discipline select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: #fff; }
.add-discipline button { border: 0; border-radius: 9px; padding: 10px; background: var(--ink); color: #fff; cursor: pointer; font-weight: 780; }

footer { display: flex; justify-content: space-between; padding: 28px 0 38px; border-top: 1px solid var(--line); color: var(--muted); font-size: .67rem; }
footer span:first-child { color: var(--ink); font-weight: 900; letter-spacing: .16em; }

dialog { width: min(430px, calc(100% - 30px)); border: 0; border-radius: 22px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 35px 100px rgba(0,0,0,.28); }

.account-gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; overflow-y: auto; padding: 24px; background: rgba(23,24,22,.72); backdrop-filter: blur(16px); }
body[data-account-state="ready"] .account-gate { display: none; }
body:not([data-account-state="ready"]) > :not(.account-gate) { pointer-events: none; user-select: none; }
.account-card { width: min(610px, 100%); border-radius: 30px; padding: clamp(28px, 6vw, 58px); background: var(--card); box-shadow: 0 40px 120px rgba(0,0,0,.3); }
.account-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; font-size: .72rem; letter-spacing: .16em; }
.account-pane[hidden] { display: none; }
.account-pane h1 { max-width: 520px; margin-bottom: 25px; font-size: clamp(3rem, 9vw, 5.5rem); }
.account-pane h2 { margin: 0 0 15px; font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.055em; }
.account-pane > p:not(.kicker):not(.account-error) { max-width: 510px; color: var(--muted); line-height: 1.6; }
.account-pane label { display: grid; gap: 8px; margin-top: 26px; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.account-pane input, .account-pane select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 15px; background: #fff; color: var(--ink); font-size: 1rem; text-transform: none; }
.account-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.account-actions button { border-radius: 999px; padding: 13px 20px; cursor: pointer; font-size: .78rem; font-weight: 850; }
.account-primary { border: 1px solid var(--ink); background: var(--ink); color: #fff; }
.account-link { display: inline-flex; align-items: center; border-radius: 999px; padding: 13px 20px; font-size: .78rem; font-weight: 850; text-decoration: none; }
.account-secondary { border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.account-back { border: 0; background: transparent; color: var(--muted); }
.account-actions button:disabled { opacity: .55; cursor: wait; }
.account-error { min-height: 1.3em; margin: 10px 0 -12px; color: #a94131; font-size: .75rem; }
.access-code { display: block; overflow-wrap: anywhere; margin: 26px 0 0; border: 2px dashed var(--orange); border-radius: 15px; padding: 18px; background: var(--orange-soft); color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(.9rem, 3vw, 1.25rem); font-weight: 900; letter-spacing: .08em; text-align: center; }
.profile-dialog-content { padding: 0 30px 30px; }
.profile-dialog-content h2 { margin-bottom: 10px; }
.profile-dialog-content > p { color: var(--muted); font-size: .8rem; line-height: 1.5; }
.profile-share-section { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.profile-share-section h3 { margin: 0 0 8px; font-size: 1.05rem; }
.profile-share-section > p:not(.dialog-kicker) { margin: 0 0 10px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.profile-share-section .share-status { color: var(--ink); font-weight: 700; }
.share-link-output { overflow-wrap: anywhere; margin: 14px 0; border-radius: 10px; padding: 12px; background: var(--orange-soft); font-size: .69rem; line-height: 1.45; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.share-actions button { border: 1px solid var(--ink); border-radius: 999px; padding: 10px 14px; background: var(--ink); color: #fff; cursor: pointer; font-size: .72rem; font-weight: 780; }
.share-actions button:disabled { opacity: .55; cursor: wait; }
.share-actions .share-revoke { border-color: #b64236; background: transparent; color: #a43127; }
.read-only-banner { width: min(100% - 40px, 1220px); margin: 18px auto 0; border: 1px solid rgba(242,91,43,.3); border-radius: 14px; padding: 13px 16px; background: var(--orange-soft); color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.read-only-banner[hidden] { display: none; }
.read-only-banner div { display: grid; gap: 2px; }
.read-only-banner strong { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; }
.read-only-banner span { color: var(--muted); font-size: .73rem; }
.read-only-banner a { flex: none; color: var(--ink); font-size: .73rem; font-weight: 800; }
body[data-read-only="true"] #save-values,
body[data-read-only="true"] #manage-disciplines,
body[data-read-only="true"] #delete-year,
body[data-read-only="true"] .year-control { display: none; }
body[data-read-only="true"] input:disabled,
body[data-read-only="true"] select:disabled { opacity: 1; color: var(--ink); -webkit-text-fill-color: var(--ink); cursor: default; }
body[data-read-only="true"] .performance-field { border-color: rgba(200,243,66,.24); background: rgba(255,255,255,.075); }
body[data-read-only="true"] .value-input { border-bottom-color: rgba(200,243,66,.55); }
body[data-read-only="true"] .value-input input:disabled { color: var(--volt); -webkit-text-fill-color: var(--volt); }
body[data-read-only="true"] .badge-profile input:disabled,
body[data-read-only="true"] .badge-profile select:disabled { color: #fff; -webkit-text-fill-color: #fff; }
body[data-read-only="true"] .badge-group-card select:disabled { background: #f4f1e9; color: var(--ink); -webkit-text-fill-color: var(--ink); }
dialog::backdrop { background: rgba(12,14,12,.65); backdrop-filter: blur(4px); }
dialog form { padding: 30px; }
.dialog-kicker { margin-bottom: 9px; color: var(--orange); font-size: .67rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
dialog h2 { margin-bottom: 13px; font-size: 1.7rem; letter-spacing: -.04em; }
dialog form > p:not(.dialog-kicker) { color: var(--muted); line-height: 1.55; font-size: .83rem; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 25px; }
.dialog-actions button { border: 0; border-radius: 999px; padding: 11px 16px; cursor: pointer; font-size: .76rem; font-weight: 780; }
.dialog-cancel { background: #e6e3db; }
.dialog-delete { background: #b64236; color: #fff; }

.toast { position: fixed; z-index: 10; left: 50%; bottom: 24px; transform: translate(-50%, 16px); padding: 11px 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .74rem; opacity: 0; pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(242,91,43,.35); outline-offset: 3px; }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: auto; gap: 38px; min-height: 0; padding-top: 74px; }
  .hero-aside { max-width: 520px; padding-top: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats article:nth-child(2) { border-right: 0; }
  .stats article:nth-child(-n+2) { border-bottom: 1px solid rgba(23,24,22,.2); }
  .stats article:nth-child(3) { padding-left: 0; }
  .entry-section { padding: 54px 30px 60px; }
  .performance-grid { grid-template-columns: 1fr; }
}

@media (max-width: 610px) {
  .site-header, .hero, .entry-section, .history-section, footer { width: min(100% - 24px, 1220px); }
  .site-header { height: 66px; }
  .privacy { display: inline-flex; padding: 8px; font-size: 0; }
  .privacy::after { content: "Profil"; font-size: .68rem; }
  .page-switch { gap: 3px; padding: 3px; }
  .page-switch button { padding: 8px 9px; font-size: .7rem; }
  .read-only-banner { width: min(100% - 24px, 1220px); align-items: flex-start; flex-direction: column; }
  .account-field-row { grid-template-columns: 1fr; gap: 0; }
  .hero { padding: 55px 0 36px; }
  .hero::before { width: 270px; height: 270px; right: -70px; top: 30px; border-width: 58px; }
  h1 { font-size: clamp(3.5rem, 18vw, 5.5rem); }
  .stats article { padding: 17px 12px; }
  .stats article:first-child, .stats article:nth-child(3) { padding-left: 0; }
  .stats strong { font-size: 1.14rem; }
  .accent-stat strong { font-size: .8rem; }
  .entry-section { padding: 42px 15px 48px; border-radius: 24px; }
  .section-head { align-items: start; flex-direction: column; }
  .year-tabs-wrap { max-width: 100%; width: 100%; }
  .year-tabs { flex: 1; }
  .entry-note { align-items: start; flex-direction: column; gap: 6px; margin-top: 28px; }
  .entry-actions { width: 100%; justify-content: space-between; margin-top: 5px; }
  .performance-field { grid-template-columns: 1.15fr .85fr; padding: 15px 12px; }
  .discipline-name { gap: 8px; font-size: .76rem; }
  .value-input input { font-size: 1.08rem; }
  .history-section { padding: 78px 0; }
  .history-head { margin-bottom: 30px; }
  .view-switch { width: 100%; }
  .view-switch button { flex: 1; }
  .history-controls { width: 100%; align-items: stretch; flex-direction: column; }
  .toggle-history { justify-content: center; }
  .trends-grid { grid-template-columns: 1fr; }
  .legend span:last-child { margin-left: 0; }
  footer { flex-direction: column; gap: 9px; }
  .badge-page { width: min(100% - 24px, 1220px); }
  .badge-hero { min-height: 0; padding: 55px 0 35px; }
  .badge-profile { grid-template-columns: 1fr 1fr; margin-top: 35px; padding: 15px; }
  .badge-profile .check-label { grid-column: 1 / -1; justify-content: start; padding-top: 8px; }
  .badge-groups { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .site-header, .hero-title, .hero-aside, .entry-section, .view-switch, footer, dialog, .toast { display: none !important; }
  .hero { display: block; min-height: 0; padding: 0 0 20px; }
  .history-section { width: 100%; padding: 0; }
  .comparison-wrap { box-shadow: none; }
}
