
/*
  Pure HTML/CSS Material Design-inspired theme
  No npm, Node.js, JavaScript framework, or build step required.

  Typography:
  - Headings: Utopia Std
  - Body/UI: Roboto
  - Currency/numeric alignment: Courier New

  Note:
  Utopia Std is a commercial font. This stylesheet uses local font lookup and
  sensible serif fallbacks. Add licensed webfont files only if your license
  permits web embedding.
*/

@font-face {
  font-family: "Utopia Std";
  src: local("Utopia Std"), local("UtopiaStd-Regular");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Utopia Std";
  src: local("Utopia Std Semibold"), local("UtopiaStd-Semibold");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: local("Roboto"), local("Roboto Regular");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: local("Roboto Bold"), local("Roboto-Bold");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Exact source palette */
  --blue-300: #7da3d6;
  --blue-500: #6483ac;
  --blue-700: #496281;

  --olive-500: #5a5b44;
  --olive-700: #474936;
  --olive-900: #353726;

  --sand-100: #f1dfc1;
  --sand-300: #bdb09b;
  --sand-500: #8c8474;

  --copper-400: #a67150;
  --copper-600: #906345;
  --copper-800: #7a5339;

  --brown-700: #54342c;
  --brown-800: #462921;
  --brown-900: #371d15;

  /* Semantic colors */
  --canvas: #f8f6f2;
  --surface: #ffffff;
  --surface-soft: #fbf7ef;
  --surface-muted: var(--sand-100);

  --text: var(--brown-900);
  --text-muted: var(--brown-700);
  --heading: var(--brown-900);

  --primary: var(--blue-700);
  --primary-hover: #3d526c;
  --primary-pressed: #33465c;
  --primary-soft: #e9eff7;

  --secondary: var(--olive-700);
  --secondary-hover: var(--olive-900);
  --secondary-soft: #eef0e8;

  --accent: var(--copper-600);
  --accent-hover: var(--copper-800);
  --accent-soft: #f8eee5;

  --error: #8a2f2f;
  --error-hover: #702626;
  --error-soft: #f8eaea;

  --warning: var(--copper-800);
  --warning-soft: #fbf1e6;

  --info: var(--blue-700);
  --info-soft: #eaf0f8;

  --success: var(--olive-700);
  --success-soft: #eef0e8;

  --border: var(--sand-500);
  --border-soft: #d8cec0;
  --divider: #ded6ca;

  --focus-inner: #ffffff;
  --focus-outer: var(--brown-900);

  --font-heading: "Utopia Std", Utopia, "Iowan Old Style", Georgia, serif;
  --font-body: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Courier New", Courier, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.25rem;
  --fs-2xl: clamp(1.5rem, 2.4vw, 2rem);
  --fs-3xl: clamp(2rem, 4vw, 3.25rem);

  --lh-tight: 1.15;
  --lh-heading: 1.2;
  --lh-body: 1.55;

  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;

  --r-sm: 0;
  --r-md: 0;
  --r-lg: 0;
  --r-pill: 999px;

  --elevation-1: 0 1px 2px rgb(55 29 21 / 0.10), 0 1px 4px rgb(55 29 21 / 0.08);
  --elevation-2: 0 4px 12px rgb(55 29 21 / 0.12);
  --elevation-3: 0 12px 32px rgb(55 29 21 / 0.16);

  --content-width: 92rem;
  --sidebar-width: 16rem;
  --appbar-height: 4rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-synthesis: none;
  line-height: var(--lh-body);
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--primary);
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--primary-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.55em;
  color: var(--heading);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--lh-heading);
}

h1 {
  font-size: var(--fs-3xl);
}

h2 {
  font-size: var(--fs-2xl);
}

h3 {
  font-size: var(--fs-xl);
}

p {
  margin: 0 0 1rem;
}

code,
pre,
kbd,
samp,
.mono,
.number,
.currency,
.percent {
  font-family: var(--font-mono);
}

:where(
  a,
  button,
  input,
  select,
  textarea,
  summary,
  [tabindex]:not([tabindex="-1"])
):focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px var(--focus-inner),
    0 0 0 5px var(--focus-outer);
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: var(--s3);
  left: var(--s3);
  padding: var(--s3) var(--s4);
  transform: translateY(-180%);
  border-radius: var(--r-sm);
  background: var(--brown-900);
  color: #ffffff;
}

.skip-link:focus {
  transform: translateY(0);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  fill: currentColor;
}

.icon-lg {
  width: 1.75rem;
  height: 1.75rem;
}

.icon-xl {
  width: 2.5rem;
  height: 2.5rem;
}

/* Application shell */

.app-shell {
  min-height: 100vh;
}

.appbar {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--appbar-height);
  display: flex;
  align-items: center;
  gap: var(--s4);
  border-bottom: 1px solid rgb(255 255 255 / 0.18);
  background: var(--brown-900);
  color: #ffffff;
  box-shadow: var(--elevation-2);
  padding-inline: var(--s5);
}

.appbar-title {
  min-width: 0;
  margin-right: auto;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appbar-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.icon-button {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.icon-button:hover {
  background: rgb(255 255 255 / 0.12);
}

.badge {
  position: absolute;
  top: 0.15rem;
  right: 0.1rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--brown-900);
  border-radius: var(--r-pill);
  background: var(--copper-400);
  color: var(--brown-900);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.layout {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: var(--appbar-height);
  min-height: calc(100vh - var(--appbar-height));
  border-right: 1px solid var(--divider);
  background: var(--surface);
  padding: var(--s4) var(--s3);
}

.nav-group {
  margin-bottom: var(--s5);
}

.nav-label {
  margin: 0 var(--s3) var(--s2);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: var(--s3);
  border-radius: 0;
  color: var(--text);
  padding: 0.55rem var(--s3);
  text-decoration: none;
}

.nav-item:hover {
  background: var(--surface-soft);
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.main {
  min-width: 0;
  padding: var(--s6);
}

.section {
  margin-bottom: var(--s8);
  scroll-margin-top: calc(var(--appbar-height) + var(--s4));
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s5);
}

.section-header p {
  max-width: 48rem;
  margin: 0;
  color: var(--text-muted);
}

.eyebrow {
  margin-bottom: var(--s2);
  color: var(--secondary);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s5);
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.breadcrumbs span + span::before {
  content: "/";
  margin-right: var(--s2);
  color: var(--sand-500);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.8fr);
  gap: var(--s6);
  border-radius: var(--r-lg);
  background:
    linear-gradient(135deg, rgb(73 98 129 / 0.97), rgb(55 29 21 / 0.96));
  color: #ffffff;
  box-shadow: var(--elevation-3);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.hero::after {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  right: -6rem;
  bottom: -8rem;
  border-radius: 0;
  background: rgb(241 223 193 / 0.13);
}

.hero h1,
.hero h2,
.hero h3 {
  color: #ffffff;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero p {
  max-width: 62ch;
  color: rgb(255 255 255 / 0.88);
}

.hero-panel {
  position: relative;
  z-index: 1;
  align-self: stretch;
  border: 1px solid rgb(255 255 255 / 0.24);
  border-radius: var(--r-lg);
  background: rgb(255 255 255 / 0.10);
  backdrop-filter: blur(8px);
  padding: var(--s5);
}

.hero-stat {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--s4);
  border-bottom: 1px solid rgb(255 255 255 / 0.18);
  padding-block: var(--s3);
}

.hero-stat:last-child {
  border-bottom: 0;
}

.hero-stat strong {
  font-family: var(--font-mono);
  font-size: 1.35rem;
}

/* Layout utilities */

.grid {
  display: grid;
  gap: var(--s5);
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stack {
  display: grid;
  gap: var(--s4);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
}

.split {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
}

/* Material-style cards */

.card {
  min-width: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--elevation-1);
}

.card-elevated {
  border-color: transparent;
  box-shadow: var(--elevation-2);
}

.card-header,
.card-body,
.card-footer {
  padding: var(--s5);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s4);
  padding-bottom: var(--s3);
}

.card-body {
  padding-top: var(--s3);
}

.card-footer {
  border-top: 1px solid var(--divider);
  padding-top: var(--s4);
}

.card-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 600;
}

.card-subtitle {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.kpi-card {
  position: relative;
  overflow: hidden;
}


.kpi-icon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}

.kpi-value {
  margin: var(--s3) 0 var(--s1);
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.1;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  color: var(--success);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.delta.down {
  color: var(--error);
}

/* Buttons */

.button {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  border: 2px solid transparent;
  border-radius: 0;
  padding: 0.65rem 1.1rem;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}

.button-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--elevation-1);
}

.button-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.button-secondary {
  border-color: var(--secondary);
  background: transparent;
  color: var(--secondary);
}

.button-secondary:hover {
  background: var(--secondary-soft);
}

.button-tonal {
  background: var(--primary-soft);
  color: var(--primary);
}

.button-tonal:hover {
  background: #dbe5f1;
}

.button-text {
  background: transparent;
  color: var(--primary);
}

.button-text:hover {
  background: var(--primary-soft);
}

.button-danger {
  background: var(--error);
  color: #ffffff;
}

.button-danger:hover {
  background: var(--error-hover);
  color: #ffffff;
}

.button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  background: var(--sand-300);
  color: var(--brown-700);
  box-shadow: none;
}

/* Chips and badges */

.chip {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  padding: 0.25rem 0.75rem;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.chip-primary {
  border-color: transparent;
  background: var(--primary-soft);
  color: var(--primary);
}

.chip-success {
  border-color: transparent;
  background: var(--success-soft);
  color: var(--success);
}

.chip-warning {
  border-color: transparent;
  background: var(--warning-soft);
  color: var(--warning);
}

.chip-error {
  border-color: transparent;
  background: var(--error-soft);
  color: var(--error);
}

.avatar {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--blue-300);
  color: var(--brown-900);
  font-weight: 700;
}

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  margin-left: -0.6rem;
  border: 3px solid var(--surface);
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

/* Tabs */

.tabs {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  border-bottom: 1px solid var(--divider);
}

.tab {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  padding: 0 var(--s4);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.tab.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

/* Forms */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s5);
}

.field {
  min-width: 0;
  display: grid;
  gap: var(--s2);
}

.field-full {
  grid-column: 1 / -1;
}

legend {
  color: var(--text);
  font-weight: 700;
}

.help {
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.error-text {
  color: var(--error);
  font-size: var(--fs-sm);
  font-weight: 700;
}

/*
  Material-style outlined floating label.

  The visible text is a real <label>, not a placeholder. placeholder=" " is
  used only as a CSS state hook. This lets the label sit inside an empty field
  and move above the value on focus or after the user enters content.
*/
.md-field {
  position: relative;
  min-width: 0;
}

.md-field input,
.md-field select,
.md-field textarea {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: 0;
  outline: none;
  background: var(--surface);
  color: var(--text);
  padding: 1.15rem 0.85rem 0.35rem;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.md-field textarea {
  min-height: 9rem;
  padding-top: 1.35rem;
  resize: vertical;
}

.md-field select {
  appearance: auto;
  padding-right: 2.5rem;
}

.md-field label {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 0.75rem;
  max-width: calc(100% - 1.5rem);
  transform: translateY(-50%);
  transform-origin: left center;
  overflow: hidden;
  background: var(--surface);
  color: var(--text-muted);
  padding-inline: 0.25rem;
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 1;
  pointer-events: none;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    top 120ms ease,
    color 120ms ease,
    font-size 120ms ease,
    font-weight 120ms ease,
    transform 120ms ease;
}

.md-field textarea + label {
  top: 1.4rem;
}

.md-field input:hover,
.md-field select:hover,
.md-field textarea:hover {
  border-color: var(--brown-700);
}

.md-field input:focus,
.md-field select:focus,
.md-field textarea:focus {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.md-field input:focus-visible,
.md-field select:focus-visible,
.md-field textarea:focus-visible {
  box-shadow:
    inset 0 0 0 1px var(--primary),
    0 0 0 2px var(--focus-inner),
    0 0 0 5px var(--focus-outer);
}

.md-field input:focus + label,
.md-field input:not(:placeholder-shown) + label,
.md-field input:-webkit-autofill + label,
.md-field textarea:focus + label,
.md-field textarea:not(:placeholder-shown) + label,
.md-field select:focus + label,
.md-field select:valid + label {
  top: 0;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: var(--fs-xs);
  font-weight: 700;
}

.md-field input[aria-invalid="true"],
.md-field select[aria-invalid="true"],
.md-field textarea[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.md-field input[aria-invalid="true"] + label,
.md-field select[aria-invalid="true"] + label,
.md-field textarea[aria-invalid="true"] + label {
  color: var(--error);
}

.md-field.has-addon input {
  padding-right: 5rem;
}

.field-addon {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  min-width: 4.35rem;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-weight: 700;
  pointer-events: none;
}

.check-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.check-row input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
}

.switch {
  position: relative;
  width: 3rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: var(--r-pill);
  background: var(--sand-500);
  transition: background 150ms ease;
}

.switch-thumb {
  position: absolute;
  left: 0.2rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--elevation-1);
  transition: transform 150ms ease;
}

.switch input:focus-visible ~ .switch-track {
  box-shadow:
    0 0 0 2px var(--focus-inner),
    0 0 0 5px var(--focus-outer);
}

.switch input:checked + .switch-track {
  background: var(--primary);
}

.switch input:checked ~ .switch-thumb {
  transform: translateX(1.25rem);
}

.range {
  width: 100%;
  accent-color: var(--primary);
}

/* Tables */

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--elevation-1);
}

table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
}

caption {
  padding: var(--s5);
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: 600;
  text-align: left;
}

th,
td {
  border-bottom: 1px solid var(--divider);
  padding: 0.9rem 1rem;
  text-align: left;
  vertical-align: middle;
}

thead th {
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr:hover {
  background: var(--primary-soft);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

.number,
.currency,
.percent {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}

.total-row {
  border-top: 3px double var(--copper-800);
  background: var(--sand-100);
  font-weight: 700;
}

/* Alerts */

.alert {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s3);
  border: 1px solid currentColor;
  border-radius: 0;
  padding: var(--s4);
}

.alert-info {
  background: var(--info-soft);
  color: var(--info);
}

.alert-success {
  background: var(--success-soft);
  color: var(--success);
}

.alert-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.alert-error {
  background: var(--error-soft);
  color: var(--error);
}

/* Progress and status */

.progress {
  width: 100%;
  height: 0.6rem;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--sand-300);
}

.progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.progress-success > span {
  background: var(--success);
}

.progress-warning > span {
  background: var(--warning);
}

.circular-progress {
  --value: 68;
  --track: var(--sand-300);
  --fill: var(--primary);
  width: 7rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 58%, transparent 59%),
    conic-gradient(var(--fill) calc(var(--value) * 1%), var(--track) 0);
}

.circular-progress strong {
  font-family: var(--font-mono);
  font-size: 1.35rem;
}

/* Charts */

.chart-card {
  min-height: 22rem;
}

.chart {
  width: 100%;
  min-height: 15rem;
}

.chart-gridline {
  stroke: var(--divider);
  stroke-width: 1;
}

.chart-axis {
  stroke: var(--brown-700);
  stroke-width: 1.5;
}

.chart-line {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-area {
  fill: url(#areaGradient);
}

.chart-point {
  fill: var(--surface);
  stroke: var(--primary);
  stroke-width: 3;
}

.chart-label {
  fill: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
}

.bar-chart {
  min-height: 16rem;
  display: flex;
  align-items: end;
  gap: var(--s4);
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--s4) var(--s4) 0;
}

.bar-item {
  min-width: 2.5rem;
  flex: 1;
  display: grid;
  align-items: end;
  gap: var(--s2);
  text-align: center;
}

.bar {
  min-height: 1rem;
  border-radius: 0;
  background: var(--primary);
}

.bar:nth-child(2n) {
  background: var(--secondary);
}

.bar-label {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

.donut {
  --value: 72%;
  width: 11rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--surface) 57%, transparent 58%),
    conic-gradient(var(--primary) 0 52%, var(--secondary) 52% 72%, var(--copper-400) 72% 100%);
}

.donut-center {
  text-align: center;
}

.donut-center strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
}

/* List, timeline, stats */

.list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--s3);
  align-items: center;
  border-bottom: 1px solid var(--divider);
  padding: var(--s4) 0;
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item-title {
  margin: 0;
  font-weight: 700;
}

.list-item-meta {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 1.2rem;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 0.25rem;
  width: 2px;
  background: var(--sand-300);
}

.timeline-item {
  position: relative;
  padding: 0 0 var(--s5) var(--s4);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 0.35rem;
  left: -1.28rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 3px solid var(--surface);
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.stat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s4);
  border-bottom: 1px solid var(--divider);
  padding-block: var(--s3);
}

.stat-row:last-child {
  border-bottom: 0;
}

/* Accordion and dialog-style examples */

details {
  border-bottom: 1px solid var(--divider);
}

summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--primary);
  font-size: 1.4rem;
}

details[open] summary::after {
  content: "-";
}

.details-body {
  padding: 0 0 var(--s4);
  color: var(--text-muted);
}

.dialog {
  max-width: 32rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--elevation-3);
  padding: var(--s6);
}

.scrim-demo {
  display: grid;
  place-items: center;
  min-height: 22rem;
  border-radius: var(--r-lg);
  background:
    linear-gradient(rgb(55 29 21 / 0.58), rgb(55 29 21 / 0.58)),
    linear-gradient(135deg, var(--blue-300), var(--sand-100));
  padding: var(--s5);
}

.snackbar {
  max-width: 34rem;
  display: flex;
  align-items: center;
  gap: var(--s4);
  border-radius: var(--r-sm);
  background: var(--brown-900);
  color: #ffffff;
  box-shadow: var(--elevation-3);
  padding: var(--s3) var(--s4);
}

.snackbar .button-text {
  margin-left: auto;
  color: var(--sand-100);
}

/* Pagination and stepper */

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.page {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.page:hover {
  background: var(--surface-muted);
}

.page.active {
  background: var(--primary);
  color: #ffffff;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--s2);
  color: var(--text-muted);
  text-align: center;
  font-size: var(--fs-sm);
}

.step::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 1rem;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--sand-300);
}

.step:first-child::before {
  display: none;
}

.step-marker {
  position: relative;
  z-index: 1;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--sand-500);
  border-radius: 50%;
  background: var(--surface);
  font-family: var(--font-mono);
  font-weight: 700;
}

.step.complete,
.step.active {
  color: var(--text);
}

.step.complete::before,
.step.active::before {
  background: var(--primary);
}

.step.complete .step-marker,
.step.active .step-marker {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

/* Tooltip */

.tooltip {
  position: relative;
  display: inline-flex;
}

.tooltip-content {
  position: absolute;
  z-index: 50;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  width: max-content;
  max-width: 16rem;
  transform: translate(-50%, 0.35rem);
  border-radius: var(--r-sm);
  background: var(--brown-900);
  color: #ffffff;
  padding: 0.35rem 0.55rem;
  font-size: var(--fs-xs);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}

.tooltip:hover .tooltip-content,
.tooltip:focus-within .tooltip-content {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Skeleton */

.skeleton {
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--sand-300);
  color: transparent;
}

.skeleton-line {
  width: 100%;
  height: 0.9rem;
}

.skeleton-line.short {
  width: 62%;
}

.skeleton-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

/* Color swatches */

.swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border-radius: var(--r-lg);
  box-shadow: var(--elevation-1);
}

.swatch {
  min-height: 7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

/* Footer */

.footer {
  border-top: 1px solid var(--divider);
  background: var(--surface);
  padding: var(--s6);
  color: var(--text-muted);
  text-align: center;
}

/* Responsive */

@media (max-width: 75rem) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 58rem) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
    display: flex;
    gap: var(--s2);
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--divider);
    padding: var(--s2) var(--s3);
  }

  .nav-group {
    display: contents;
  }

  .nav-label {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .main {
    padding: var(--s5);
  }
}

@media (max-width: 44rem) {
  .grid-2,
  .grid-3,
  .grid-4,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .main {
    padding: var(--s4);
  }

  .appbar {
    padding-inline: var(--s3);
  }

  .appbar-title {
    font-size: 1rem;
  }

  .section {
    margin-bottom: var(--s7);
  }

  .section-header {
    display: block;
  }

  .stepper {
    grid-template-columns: 1fr;
    gap: var(--s3);
  }

  .step {
    grid-template-columns: auto 1fr;
    justify-items: start;
    text-align: left;
  }

  .step::before {
    top: -1rem;
    left: 1rem;
    width: 2px;
    height: 100%;
  }

  .swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .card,
  .button,
  .input,
  select,
  textarea,
  .chip,
  .alert,
  .table-wrap,
  .dialog,
  .snackbar {
    border: 2px solid CanvasText;
  }

  :focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 3px;
    box-shadow: none;
  }
}

@media print {
  .appbar,
  .sidebar,
  .button,
  .icon-button,
  .snackbar {
    display: none !important;
  }

  .layout {
    display: block;
  }

  .main {
    padding: 0;
  }

  .card,
  .table-wrap,
  .hero {
    box-shadow: none;
  }

  .hero {
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
  }

  .hero h1,
  .hero h2,
  .hero h3,
  .hero p {
    color: #000000;
  }
}


.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
