/*
 * esz portal stylesheet — hand-authored, no build step.
 *
 * Source order (later wins on equal specificity): brand tokens and fonts
 * (imported from the shared source files that the PDF layer also reads),
 * base element styles, the .esz-* components, then the small set of
 * utility classes the templates actually use. When a template needs a utility
 * that is not here, add it here — there is no compiler to fall back on.
 */
@import "tokens.css";
@import "fonts.css";

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

html {
  background: var(--brand-page);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--brand-page);
  color: var(--brand-ink);
  font-family: var(--brand-font);
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure {
  margin: 0;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--brand-yellow);
  outline-offset: 2px;
}

/* components */
.esz-accent {
  background: var(--brand-yellow);
  height: 0.375rem;
}

.esz-shell {
  margin-inline: auto;
  max-width: 64rem;
  padding-inline: 1rem;
  width: 100%;
}

.esz-nav {
  background: var(--brand-white);
  border-bottom: 1px solid var(--brand-slate-100);
  box-shadow: var(--brand-shadow);
}

.esz-nav-inner {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  min-height: 4.25rem;
}

.esz-logo {
  height: 2.5rem;
  width: auto;
}

.esz-wordmark {
  border-left: 1px solid var(--brand-slate-200);
  color: var(--brand-navy);
  font-size: 1rem;
  letter-spacing: -0.01em;
  padding-left: 0.75rem;
}

.esz-nav-link {
  color: var(--brand-slate-700);
  font-size: 0.875rem;
  font-weight: 700;
  padding-block: 0.35rem;
  transition: color 150ms ease;
}

.esz-nav-link:hover,
.esz-nav-link[aria-current="page"] {
  color: var(--brand-ink);
}

.esz-underline {
  position: relative;
}

.esz-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--brand-yellow);
  transform: scaleX(0);
  transition: transform 150ms ease;
}

.esz-underline:hover::after,
.esz-underline[aria-current="page"]::after {
  transform: scaleX(1);
}

.esz-linkbtn {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.esz-card {
  background: var(--brand-white);
  border: 1px solid var(--brand-slate-100);
  border-radius: 1rem;
  box-shadow: var(--brand-shadow);
}

.esz-card-elevated {
  border-radius: 1.5rem;
  box-shadow: 0 20px 50px rgb(0 0 0 / 5%);
}

.esz-btn {
  align-items: center;
  background: var(--brand-slate-600);
  border: 1px solid var(--brand-slate-600);
  border-radius: 0.75rem;
  color: var(--brand-white);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 700;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.65rem 1.5rem;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.esz-btn:hover {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
}

.esz-btn:active {
  transform: scale(0.98);
}

.esz-btn-secondary {
  background: var(--brand-white);
  border-color: var(--brand-rule);
  color: var(--brand-ink);
}

.esz-btn-secondary:hover {
  background: var(--brand-slate-50);
  border-color: var(--brand-slate-400);
}

.esz-field,
.esz-form input[type="text"],
.esz-form input[type="password"],
.esz-form input[type="date"],
.esz-form input[type="file"] {
  background: var(--brand-white);
  border: 1px solid var(--brand-rule);
  border-radius: 0.75rem;
  color: var(--brand-ink);
  font-size: 0.875rem;
  min-height: 2.5rem;
  padding: 0.65rem 1rem;
  width: 100%;
}

.esz-field:focus,
.esz-form input:focus {
  border-color: var(--brand-yellow);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-yellow) 30%, transparent);
  outline: none;
}

.esz-alert {
  background: var(--brand-white);
  border: 1px solid var(--brand-rule);
  border-left: 4px solid var(--brand-yellow);
  border-radius: 0.75rem;
  box-shadow: var(--brand-shadow);
  padding: 0.75rem 1rem;
}

.esz-alert-error {
  background: var(--brand-danger-soft);
  border-color: var(--brand-danger);
  color: var(--brand-danger);
}

.esz-choice-grid {
  display: grid;
  gap: 0.5rem;
}

.esz-choice {
  align-items: center;
  background: var(--brand-white);
  border: 1px solid var(--brand-rule);
  border-radius: 0.625rem;
  color: var(--brand-slate-700);
  cursor: pointer;
  display: flex;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.625rem;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.esz-choice:hover {
  background: var(--brand-slate-50);
  border-color: var(--brand-slate-400);
}

.esz-choice:has(input:checked) {
  background: var(--brand-yellow-100);
  border-color: var(--brand-yellow);
  box-shadow: inset 0 0 0 1px var(--brand-yellow);
  color: var(--brand-ink);
}

.esz-choice input {
  accent-color: var(--brand-slate-700);
  height: 1rem;
  margin: 0;
  width: 1rem;
}

.esz-lookup-result {
  background: var(--brand-slate-50);
  border: 1px solid var(--brand-rule);
  border-left: 4px solid var(--brand-yellow);
  padding: 1rem;
}

.esz-lookup-summary {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0;
}

.esz-lookup-summary div {
  display: grid;
  gap: 0.125rem;
  grid-template-columns: minmax(0, 1fr);
}

.esz-lookup-summary dt {
  color: var(--brand-slate-600);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.esz-lookup-summary dd {
  color: var(--brand-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.esz-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.esz-result-actions a {
  color: var(--brand-slate-700);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--brand-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25rem;
}

.esz-result-actions a:hover {
  color: var(--brand-ink);
}

.esz-badge {
  background: var(--brand-yellow-100);
  border-radius: 9999px;
  color: var(--brand-yellow-900);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
}

.esz-table-wrap {
  overflow-x: auto;
}

.esz-table {
  border-collapse: collapse;
  font-size: 0.875rem;
  width: 100%;
}

.esz-table th {
  background: var(--brand-slate-700);
  color: var(--brand-white);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.esz-table th,
.esz-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.esz-table th a {
  color: var(--brand-white);
}

.esz-table th a:hover {
  color: var(--brand-yellow);
}

.esz-table tbody tr+tr {
  border-top: 1px solid var(--brand-slate-100);
}

.esz-label {
  color: var(--brand-slate-600);
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.esz-summary {
  cursor: pointer;
  display: inline-block;
  padding-block: 0.25rem;
}

.esz-summary:hover {
  color: var(--brand-ink);
}

.esz-chip {
  align-items: center;
  background: var(--brand-white);
  border: 1px solid var(--brand-rule);
  border-radius: 9999px;
  color: var(--brand-ink);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.esz-chip:hover {
  background: var(--brand-slate-50);
  border-color: var(--brand-slate-400);
}

.esz-select-col {
  width: 1%;
}

.esz-select-col input {
  accent-color: var(--brand-slate-600);
  cursor: pointer;
  height: 1rem;
  width: 1rem;
}

.esz-center-viewport {
  min-height: calc(100vh - 9rem);
}

/* utilities */
.block {
  display: block;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.mx-auto {
  margin-inline: auto;
}

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

.text-right {
  text-align: right;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.font-bold {
  font-weight: 700;
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.uppercase {
  text-transform: uppercase;
}

.tracking-widest {
  letter-spacing: 0.1em;
}

.underline {
  text-decoration-line: underline;
}

.underline-offset-4 {
  text-underline-offset: 4px;
}

.decoration-2 {
  text-decoration-thickness: 2px;
}

.decoration-accent-400 {
  text-decoration-color: var(--brand-yellow-400);
}

.break-all {
  word-break: break-all;
}

.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.text-brand-600 {
  color: var(--brand-slate-600);
}

.text-brand-700 {
  color: var(--brand-slate-700);
}

.text-brand-800 {
  color: var(--brand-navy);
}

.text-ink {
  color: var(--brand-ink);
}

.text-muted {
  color: var(--brand-slate-600);
}

.text-danger {
  color: var(--brand-danger);
}

.border {
  border-width: 1px;
  border-style: solid;
}

.border-b {
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

.border-dashed {
  border-style: dashed;
}

.border-rule {
  border-color: var(--brand-rule);
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-5 {
  gap: 1.25rem;
}

.gap-6 {
  gap: 1.5rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-5 {
  margin-top: 1.25rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-10 {
  margin-bottom: 2.5rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-8 {
  padding: 2rem;
}

.p-10 {
  padding: 2.5rem;
}

.pb-6 {
  padding-bottom: 1.5rem;
}

.pb-8 {
  padding-bottom: 2rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.w-full {
  width: 100%;
}

.w-auto {
  width: auto;
}

.h-5 {
  height: 1.25rem;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-xl {
  max-width: 36rem;
}

.min-h-52 {
  min-height: 13rem;
}

.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow,
    transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.hover\:text-ink:hover {
  color: var(--brand-ink);
}

.hover\:text-danger:hover {
  color: var(--brand-danger);
}

.hover\:bg-accent-200:hover {
  background: var(--brand-yellow-200);
}

.hover\:border-accent-400:hover {
  border-color: var(--brand-yellow-400);
}

.hover\:shadow-lg:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);
}

.group:hover .group-hover\:text-ink {
  color: var(--brand-ink);
}

.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;
}

@media (min-width: 640px) {
  .esz-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sm\:flex-row {
    flex-direction: row;
  }

  .sm\:items-center {
    align-items: center;
  }

  .sm\:justify-between {
    justify-content: space-between;
  }

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

  .sm\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  .sm\:p-8 {
    padding: 2rem;
  }

  .sm\:p-12 {
    padding: 3rem;
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .lg\:col-span-4 {
    grid-column: span 4 / span 4;
  }
}

@media (max-width: 48rem) {
  .esz-nav-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    padding-block: 1rem;
  }
}
