/* GeoCzech academic readability layer
   Loaded after styles.css to preserve the existing cartographic identity while
   improving type roles, text size, scanning, focus, and long-form reading. */

:root {
  --font-reading: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-interface: "IBM Plex Sans", system-ui, sans-serif;
  --font-technical: "IBM Plex Mono", ui-monospace, monospace;
  --border-control: #718890;
}

html {
  font-size: 16px;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-reading);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-serif {
  font-family: var(--font-interface) !important;
  letter-spacing: -0.012em;
}

.font-mono,
code,
kbd,
samp,
pre {
  font-family: var(--font-technical) !important;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

/* Brand and global navigation */
.brand-word {
  font-family: var(--font-interface);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.025em;
}

.brand-subtitle {
  font-family: var(--font-reading);
  font-size: 0.75rem;
  line-height: 1.25;
  letter-spacing: 0.035em;
  text-transform: none;
}

.site-header nav {
  font-family: var(--font-interface);
  font-size: 1rem;
}

#lang-en,
#lang-cz {
  min-width: 2.75rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

/* Hero */
.coordinate-eyebrow {
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.hero-title {
  max-width: 56rem;
  font-family: var(--font-interface);
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-transform: none;
  text-wrap: balance;
}

.atlas-hero p.text-lg {
  max-width: 44rem;
  font-size: 1.125rem;
  line-height: 1.7;
}

.registry-ledger dt {
  font-size: 0.8125rem;
  line-height: 1.35;
  letter-spacing: 0.055em;
}

.registry-ledger dd {
  font-family: var(--font-interface);
  font-size: 1.75rem;
  font-weight: 650;
}

.atlas-search-head {
  font-size: 0.8125rem;
  line-height: 1.45;
  letter-spacing: 0.045em;
}

.atlas-search-action {
  font-family: var(--font-interface);
  font-size: 0.9375rem;
  letter-spacing: 0.015em;
  text-transform: none;
}

.scope-title {
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.055em;
}

.scope-button {
  min-height: 4.5rem;
}

.scope-button > span:first-child {
  font-family: var(--font-interface);
  font-size: 0.9375rem;
}

.scope-button > span:last-child {
  font-size: 0.8125rem;
  line-height: 1.35;
}

.index-tab {
  min-height: 2.75rem;
  font-family: var(--font-interface);
  font-size: 0.875rem;
  letter-spacing: 0;
  text-transform: none;
}

/* Forms and controls */
input,
select,
textarea,
button {
  font-family: var(--font-reading);
}

input,
select,
textarea {
  border-color: var(--border-control) !important;
  font-size: 1rem;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: #657981;
  opacity: 1;
}

.focus-ring:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--focus);
}

/* Repository labels and filter rail */
.filter-rail::before {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.filter-rail h2,
.filter-rail h3,
.register-heading > div > span,
.section-rule h2,
.detail-label {
  font-family: var(--font-interface) !important;
}

.filter-rail h2,
.filter-rail h3 {
  font-size: 0.8125rem !important;
  line-height: 1.4;
  letter-spacing: 0.055em !important;
}

.filter-rail label {
  font-size: 0.9375rem;
  line-height: 1.45;
}

.register-heading h2 {
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  line-height: 1.18;
}

/* Dataset rows and cards */
.record-code {
  top: 1.55rem;
  max-width: 3.4rem;
  font-size: 0.75rem;
  line-height: 1.3;
  letter-spacing: 0.025em;
}

.record-row button.text-xl,
.sheet-card h3 {
  font-family: var(--font-interface) !important;
  font-size: 1.3125rem !important;
  font-weight: 650 !important;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.record-row p.text-sm,
.sheet-card p.text-sm {
  font-size: 1rem !important;
  line-height: 1.58;
}

.record-row p.font-mono,
.sheet-card p.font-mono {
  font-family: var(--font-reading) !important;
  font-size: 0.875rem !important;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}

.record-row .text-\[9px\] {
  font-family: var(--font-interface) !important;
  font-size: 0.8125rem !important;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-transform: none;
}

.sheet-card > div:first-child .font-mono,
.record-row .font-mono.text-xs,
.search-suggestion-panel .font-mono.text-xs,
.geo-picker-panel .font-mono.text-xs {
  font-size: 0.8125rem !important;
  line-height: 1.4;
  letter-spacing: 0.025em !important;
}

.sheet-card .text-xs,
.record-row .text-xs,
.inline-flex.text-xs {
  font-size: 0.8125rem;
  line-height: 1.4;
}

.sheet-card button,
.sheet-card a,
.record-row button,
.record-row a {
  font-size: 0.9375rem;
}

/* Page headings and explanatory text */
.section-rule h2 {
  font-size: clamp(1.625rem, 3vw, 2rem) !important;
  line-height: 1.2;
  letter-spacing: -0.018em !important;
  text-transform: none;
}

main h1.text-3xl,
main h1.md\:text-4xl {
  font-size: clamp(2rem, 4vw, 2.75rem) !important;
  line-height: 1.12;
}

main p.text-lg.font-serif,
main p.text-xl.font-serif,
main p.md\:text-2xl.font-serif {
  max-width: 46rem;
  font-family: var(--font-reading) !important;
  font-size: 1.125rem !important;
  line-height: 1.7 !important;
  letter-spacing: 0;
}

/* Long-form Methods content: works without the Tailwind Typography plugin. */
.prose {
  max-width: 70ch;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.prose h2,
.prose h3,
.prose h4 {
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
  font-family: var(--font-interface);
  font-weight: 650;
  line-height: 1.25;
}

.prose h3 {
  font-size: 1.375rem;
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

/* Metadata and detail pages */
main dt.text-xs,
main span.text-xs.font-semibold.uppercase,
main h4.text-xs {
  font-family: var(--font-interface) !important;
  font-size: 0.8125rem !important;
  line-height: 1.4;
  letter-spacing: 0.045em !important;
}

main table {
  line-height: 1.55;
}

main table th,
main table td {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

/* Footer */
.site-footer {
  font-size: 1rem;
  line-height: 1.6;
}

.site-footer h3,
.site-footer h4 {
  font-family: var(--font-interface) !important;
  letter-spacing: -0.01em;
}

.site-footer .text-xs {
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Responsive refinements */
@media (max-width: 767px) {
  .hero-title {
    font-size: clamp(2.6rem, 13vw, 3.25rem);
    line-height: 1.04;
  }

  .coordinate-eyebrow {
    margin-bottom: 1.25rem;
  }

  .atlas-hero p.text-lg {
    font-size: 1.0625rem;
  }

  .register-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .register-heading > .flex {
    width: 100%;
    flex-wrap: wrap;
  }

  .register-heading select,
  .register-heading a {
    min-height: 2.75rem;
  }

  .site-header {
    min-height: 4rem;
  }
}

@media (min-width: 1024px) {
  .atlas-hero .container {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sheet-card:hover,
  .record-row:hover {
    transform: none;
  }
}
