:root {
  --hp-bg: #faf7f4;
  --hp-surface: #fffdfb;
  --hp-surface-subtle: #f5efeb;
  --hp-text: #302826;
  --hp-muted: #6c615c;
  --hp-border: #d9cec7;
  --hp-accent: #91483e;
  --hp-accent-hover: #743830;
  --hp-accent-subtle: #f3e4e0;
  --hp-danger: #a52c2a;
  --hp-danger-subtle: #f9e8e7;
  --hp-success: #2f6a4b;
  --hp-success-subtle: #e5f1ea;
  --hp-warning: #825b10;
  --hp-warning-subtle: #f9efd9;
  --hp-focus: #075a92;
  --hp-radius-sm: .45rem;
  --hp-radius: .75rem;
  --hp-radius-lg: 1.1rem;
  --hp-shadow: 0 1px 3px rgb(48 40 38 / 8%), 0 8px 24px rgb(48 40 38 / 4%);
  --hp-space-1: .35rem;
  --hp-space-2: .65rem;
  --hp-space-3: 1rem;
  --hp-space-4: 1.5rem;
  --hp-space-5: 2.25rem;
  --hp-space-6: 3.5rem;
  --hp-content-width: 78rem;
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--hp-text);
  background: var(--hp-bg);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; background: var(--hp-bg); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
a { color: var(--hp-accent); text-underline-offset: .2em; }
a:hover { color: var(--hp-accent-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--hp-space-3); }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 var(--hp-space-3); }
input, select, textarea { width: 100%; min-height: 2.75rem; padding: .55rem .7rem; color: var(--hp-text); background: var(--hp-surface); border: 1px solid var(--hp-border); border-radius: var(--hp-radius-sm); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--hp-focus) 35%, transparent); outline-offset: 2px; }
label { font-weight: 650; }
.validation-message { color: var(--hp-danger); font-size: .9rem; }
.hp-shell { width: min(100% - 2rem, var(--hp-content-width)); margin-inline: auto; }
.hp-main { padding-block: var(--hp-space-5); padding-bottom: calc(var(--hp-space-6) + 4rem); }
.hp-page-head { display: flex; align-items: start; justify-content: space-between; gap: var(--hp-space-3); margin-bottom: var(--hp-space-4); }
.hp-muted { color: var(--hp-muted); }
.hp-stack { display: grid; gap: var(--hp-space-3); }
.hp-home-content { display: grid; gap: var(--hp-space-3); }
.hp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: var(--hp-space-3); }
.hp-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--hp-space-2); }
.hp-row--between { justify-content: space-between; }
.hp-form { max-width: 34rem; display: grid; gap: var(--hp-space-3); }
.hp-field { display: grid; gap: var(--hp-space-1); }
.hp-button { min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; padding: .55rem 1rem; border: 1px solid var(--hp-accent); border-radius: var(--hp-radius-sm); color: white; background: var(--hp-accent); cursor: pointer; text-decoration: none; font-weight: 650; }
.hp-button:hover { color: white; background: var(--hp-accent-hover); }
.hp-button--secondary { color: var(--hp-text); background: transparent; border-color: var(--hp-border); }
.hp-button--secondary:hover { color: var(--hp-text); background: var(--hp-surface-subtle); }
.hp-button--danger { background: var(--hp-danger); border-color: var(--hp-danger); }
.hp-button:disabled { opacity: .55; cursor: not-allowed; }
.hp-list { margin: 0; padding: 0; list-style: none; }
.hp-list > li { padding-block: .8rem; border-top: 1px solid var(--hp-border); }
.hp-list > li:first-child { border-top: 0; }
.hp-linkbox { overflow-wrap: anywhere; padding: .75rem; background: var(--hp-surface-subtle); border-radius: var(--hp-radius-sm); }
dialog { max-width: min(32rem, calc(100% - 2rem)); padding: var(--hp-space-4); border: 1px solid var(--hp-border); border-radius: var(--hp-radius); color: var(--hp-text); background: var(--hp-surface); }
dialog::backdrop { background: rgb(48 40 38 / 45%); }
#blazor-error-ui { display: none; position: fixed; inset: auto 1rem 1rem; padding: 1rem; background: var(--hp-warning-subtle); }
.loading-progress { display: block; margin: 20vh auto; width: 4rem; height: 4rem; }
.hp-header { background: var(--hp-surface); border-bottom: 1px solid var(--hp-border); }
.hp-header__inner { min-height: 4rem; display: flex; align-items: center; justify-content: space-between; gap: var(--hp-space-3); }
.hp-brand { color: var(--hp-text); font-weight: 750; text-decoration: none; }
.hp-account-nav { display: flex; align-items: center; gap: var(--hp-space-1); }
.hp-account-nav a, .hp-link-button { min-height: 2.75rem; display: inline-flex; align-items: center; padding: .55rem .7rem; border: 0; border-radius: var(--hp-radius-sm); color: var(--hp-muted); background: transparent; cursor: pointer; font: inherit; text-decoration: none; }
.hp-account-nav a:hover, .hp-account-nav a.active, .hp-link-button:hover { color: var(--hp-text); background: var(--hp-surface-subtle); }
.hp-sidebar { position: fixed; inset: 4rem auto 0 0; width: max(12rem, calc((100vw - var(--hp-content-width)) / 2 + 10rem)); padding: var(--hp-space-4) var(--hp-space-3); border-right: 1px solid var(--hp-border); background: var(--hp-surface); }
.hp-navigation { display: flex; flex-direction: column; gap: .25rem; height: 100%; max-width: 10rem; margin-left: auto; }
.hp-navigation a { display: block; padding: .55rem .7rem; border-radius: var(--hp-radius-sm); color: var(--hp-muted); text-decoration: none; }
.hp-navigation a.active { color: var(--hp-accent); background: var(--hp-accent-subtle); font-weight: 700; }
.hp-navigation__switch { margin-top: auto; border-top: 1px solid var(--hp-border); padding-top: var(--hp-space-3) !important; }
.hp-mobile-nav { display: none; }
.hp-app:has(.hp-sidebar) .hp-main { width: auto; max-width: none; margin-inline: 0; margin-left: max(12rem, calc((100vw - var(--hp-content-width)) / 2 + 10rem)); padding-inline: clamp(2rem, 5vw, 6rem); }

@media (max-width: 48rem) {
  .hp-page-head { flex-direction: column; }
  .hp-main { padding-block: var(--hp-space-4); padding-bottom: 6rem; }
  .hp-sidebar { display: none; }
  .hp-mobile-nav { position: fixed; z-index: 5; inset: auto 0 0; min-height: 4.5rem; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: .4rem 1rem calc(.4rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--hp-border); background: var(--hp-surface); box-shadow: 0 -4px 16px rgb(48 40 38 / 7%); overflow-x: auto; }
  .hp-mobile-nav a { display: grid; place-items: center; padding: .55rem .25rem; border-radius: var(--hp-radius-sm); color: var(--hp-muted); text-decoration: none; font-size: .8rem; text-align: center; }
  .hp-mobile-nav a.active { color: var(--hp-accent); background: var(--hp-accent-subtle); font-weight: 700; }
  .hp-app:has(.hp-sidebar) .hp-main { width: min(100% - 2rem, var(--hp-content-width)); margin-inline: auto; padding-inline: 0; }
}

@media (max-width: 36rem) {
  .hp-header__inner { align-items: flex-start; padding-block: var(--hp-space-2); }
  .hp-account-nav { flex-wrap: wrap; justify-content: flex-end; }
}

@media (prefers-reduced-motion: no-preference) {
  .hp-button, a { transition: color .15s, background-color .15s, border-color .15s; }
}
