:root {
  --ink: #0e141b;
  --ink-soft: #3a4553;
  --paper: #f3f1eb;
  --paper-2: #e8e4db;
  --line: rgba(14, 20, 27, 0.12);
  --amber: #e08a16;
  --amber-deep: #c46f0a;
  --teal: #1f6f6a;
  --teal-soft: #d7ebe8;
  --ok: #1a7a4c;
  --bad: #b42318;
  --warn: #9a6700;
  --radius: 14px;
  --font-display: "Archivo Black", sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --shadow: 0 24px 60px rgba(14, 20, 27, 0.12);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(224, 138, 22, 0.18), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(31, 111, 106, 0.14), transparent 50%),
    linear-gradient(180deg, #ebe7de 0%, var(--paper) 35%, #efece4 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.035;
  z-index: 50;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(14px);
  background: rgba(243, 241, 235, 0.82);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  position: relative;
  width: 2.05rem;
  height: 2.05rem;
  flex-shrink: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  animation: none;
}

.logo-mark svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.logo-hex {
  fill: #121a22;
  stroke: rgba(224, 138, 22, 0.55);
  stroke-width: 1.2;
  filter: drop-shadow(0 0 6px rgba(224, 138, 22, 0.28));
}

.logo-ring {
  fill: none;
  stroke: #e08a16;
  stroke-width: 1.5;
  stroke-dasharray: 18 32;
  stroke-linecap: round;
  transform-origin: 20px 20px;
  animation: logo-orbit 3.6s linear infinite;
}

.logo-core {
  fill: #ffc45c;
  filter: drop-shadow(0 0 4px rgba(224, 138, 22, 0.85));
  animation: logo-core 2.4s var(--ease) infinite;
}

.logo-trace {
  stroke: rgba(255, 196, 92, 0.7);
  stroke-width: 1.2;
  stroke-linecap: round;
  animation: logo-trace 2.8s ease-in-out infinite;
}

.logo-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.14em;
  background: linear-gradient(105deg, #0e141b 0%, #1f2a36 42%, #c46f0a 78%, #e08a16 100%);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: logo-sheen 7s ease-in-out infinite;
}

.logo-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--teal);
  text-transform: uppercase;
}

.logo:hover .logo-hex {
  stroke: rgba(224, 138, 22, 0.95);
}

.logo:hover .logo-ring {
  animation-duration: 1.4s;
}

.logo:hover .logo-text {
  animation-duration: 2.2s;
}

@keyframes logo-orbit {
  to { transform: rotate(360deg); }
}

@keyframes logo-core {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.82); }
}

@keyframes logo-trace {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@keyframes logo-sheen {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 3px rgba(224, 138, 22, 0.2); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(224, 138, 22, 0.08); }
}

.nav {
  display: none;
  gap: 1.25rem;
  margin-left: auto;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--ink);
}

.header-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.25s var(--ease), background 0.25s;
}

.header-cta:hover {
  color: var(--paper);
  background: #1c2530;
  transform: translateY(-1px);
}

@media (min-width: 820px) {
  .nav { display: flex; }
  .header-cta { margin-left: 0; }
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  gap: 2.5rem;
  align-items: end;
  min-height: calc(100vh - 4.2rem);
  padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 8vh, 5rem);
  overflow: hidden;
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }
}

.hero-glow {
  position: absolute;
  inset: auto -10% 10% 40%;
  height: 50%;
  background: radial-gradient(ellipse, rgba(224, 138, 22, 0.22), transparent 70%);
  filter: blur(20px);
  animation: drift 10s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(-2%, 0); }
  to { transform: translate(4%, -3%); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 28 49'%3E%3Cg fill='none' stroke='%230e141b' stroke-opacity='0.11' stroke-width='0.6'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.31L0 35.35v-1.85zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v1.85l-11 6.34V49h-2zm12.99-33.25L28 12.69v2.32l-11 6.34V17.9l10.99-6.34z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 56px 98px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.65), transparent 88%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.65), transparent 88%);
  pointer-events: none;
  animation: hex-wallpaper 32s linear infinite;
}

.hero-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 28 49'%3E%3Cpath fill='%23e08a16' fill-opacity='0.09' d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9z'/%3E%3C/svg%3E");
  background-size: 56px 98px;
  animation: hex-wallpaper-fill 20s linear infinite reverse, hex-wallpaper-pulse 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes hex-wallpaper {
  from { background-position: 0 0; }
  to { background-position: 56px 98px; }
}

@keyframes hex-wallpaper-fill {
  from { background-position: 0 0; }
  to { background-position: -112px 196px; }
}

@keyframes hex-wallpaper-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.95; }
}

.hero-content {
  position: relative;
  max-width: 38rem;
  animation: rise 0.9s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.hero-brand {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 10vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

.hero-lead {
  margin: 0 0 1.75rem;
  color: var(--ink-soft);
  max-width: 38ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s, opacity 0.25s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
  border-color: rgba(14, 20, 27, 0.08);
}

.btn-primary:hover:not(:disabled) {
  background: #eb961f;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  border-color: rgba(14, 20, 27, 0.28);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

.hero-visual {
  position: relative;
  animation: rise 1s 0.15s var(--ease) both;
}

.chip-panel {
  position: relative;
  margin-inline: auto;
  max-width: 26rem;
  border-radius: 18px;
  background: linear-gradient(160deg, #18212c 0%, #0f151c 100%);
  color: #d9e0e8;
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.chip-panel-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.chip-led {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #3dd68c;
  box-shadow: 0 0 12px rgba(61, 214, 140, 0.7);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.chip-status {
  margin-left: auto;
  color: #3dd68c;
}

.chip-body {
  display: grid;
  gap: 0.7rem;
  padding: 1.35rem 1.2rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.4;
}

.chip-body code {
  color: #a8b4c2;
}

.chip-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(224, 138, 22, 0.85), transparent);
  animation: scan 3.2s var(--ease) infinite;
}

@keyframes scan {
  0% { top: 18%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 92%; opacity: 0; }
}

/* Sections */
.service,
.faq-section,
.upload-section,
.modules-section,
.contact-section {
  padding: clamp(3rem, 8vh, 5.5rem) clamp(1.25rem, 4vw, 3rem);
  content-visibility: auto;
  contain-intrinsic-size: 1px 720px;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 42rem;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0 0.85rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  color: var(--ink);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 1.1rem;
  color: var(--teal);
  font-weight: 700;
}

.faq-item[open] summary::before {
  content: "–";
}

.faq-item p {
  margin: 0.65rem 0 0 1.1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 48ch;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  max-width: none;
}

.section-head h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

.steps {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  padding: 1.4rem 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  transition: transform 0.35s var(--ease), border-color 0.35s;
}

.step:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 20, 27, 0.22);
}

.step-num {
  display: block;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--amber-deep);
}

.step h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.service-note {
  margin: 1.75rem 0 0;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--amber);
  background: rgba(224, 138, 22, 0.08);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Upload */
.upload-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 980px) {
  .upload-layout {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.search-panel,
.drop-panel {
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  padding: 1.25rem;
  backdrop-filter: blur(10px);
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.field span {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.field-row {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

.part-find-field > span {
  display: block;
  margin-bottom: 0.4rem;
}

.part-find-row {
  display: flex;
  gap: 0.55rem;
  align-items: stretch;
}

.part-find-row input {
  flex: 1;
  min-width: 0;
}

.btn-find {
  flex-shrink: 0;
  border-radius: 10px;
  padding: 0.8rem 1.15rem;
  align-self: stretch;
}

input[type="search"],
input[type="number"],
input[type="email"],
input[type="text"],
select,
textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea {
  resize: vertical;
  min-height: 8rem;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(31, 111, 106, 0.55);
  box-shadow: 0 0 0 3px rgba(31, 111, 106, 0.12);
}

input.is-auto,
select.is-auto {
  border-color: rgba(201, 148, 36, 0.55);
  background: rgba(201, 148, 36, 0.08);
}

.result-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.clear-filters-btn {
  margin: 0.35rem 0 0.75rem;
  align-self: flex-start;
}

.search-results-block[hidden] {
  display: none !important;
}

.search-results-block {
  margin-top: 0.25rem;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--teal);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.module-results {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 28rem;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  transition: max-height 0.3s var(--ease);
}

.search-panel.is-filtering .module-results {
  max-height: 14rem;
}

.search-panel.is-filtering .module-item {
  padding: 0.55rem 0.75rem;
}

.search-panel.is-filtering .module-item-num {
  font-size: 0.8rem;
}

.search-panel.is-filtering .module-item-sub {
  font-size: 0.75rem;
}

.module-results:empty::after {
  display: none;
}

.module-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.2s;
}

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

.module-item:hover,
.module-item.is-selected {
  background: var(--teal-soft);
}

.module-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.module-item-num {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
}

.module-item-size {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber-deep);
  white-space: nowrap;
}

.module-item-sub {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.selected-module {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(31, 111, 106, 0.12), rgba(224, 138, 22, 0.1));
  border: 1px solid rgba(31, 111, 106, 0.2);
}

.selected-label {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.selected-number {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  word-break: break-all;
}

.selected-meta {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.dropzone {
  display: grid;
  gap: 0.9rem;
}

.dropzone-inner {
  border: 1.5px dashed rgba(14, 20, 27, 0.22);
  border-radius: 14px;
  padding: 1.75rem 1.2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.4);
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.dropzone-inner.is-active {
  border-color: var(--teal);
  background: var(--teal-soft);
  transform: scale(1.01);
}

.dropzone-inner.is-ready {
  border-style: solid;
  border-color: rgba(31, 111, 106, 0.35);
}

.drop-icon {
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.drop-title {
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.drop-hint,
.drop-req {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.drop-req {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.file-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.file-name {
  margin: 0;
  font-weight: 600;
  word-break: break-all;
}

.file-size {
  margin: 0.2rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.size-check {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
}

.size-check.ok {
  background: rgba(26, 122, 76, 0.12);
  color: var(--ok);
}

.size-check.bad {
  background: rgba(180, 35, 24, 0.1);
  color: var(--bad);
}

.size-check.warn {
  background: rgba(154, 103, 0, 0.12);
  color: var(--warn);
}

.upload-success {
  text-align: center;
  padding: 2rem 1rem;
}

.success-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}

/* Catalog */
.catalog-search-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  min-width: min(100%, 16rem);
}

.catalog-search {
  width: 16rem;
  min-width: 10rem;
  max-width: 100%;
  margin: 0;
  transition: width 0.28s var(--ease);
}

.catalog-search input {
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
}

.catalog-search.is-active {
  width: 10rem;
}

.catalog-search.is-active input {
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
}

.catalog-match {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.table-wrap {
  overflow: auto;
  max-height: min(70vh, 42rem);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  transition: max-height 0.3s var(--ease);
}

.table-wrap.is-filtering {
  max-height: min(42vh, 18rem);
}

.table-wrap.is-filtering .module-table {
  font-size: 0.8rem;
}

.table-wrap.is-filtering .module-table th,
.table-wrap.is-filtering .module-table td {
  padding: 0.35rem 0.55rem;
  font-size: 0.78rem;
}

.module-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.module-table th,
.module-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.module-table th {
  position: sticky;
  top: 0;
  background: #ebe7de;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.module-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.module-table tbody tr:hover {
  background: var(--teal-soft);
}

.module-table tbody tr.is-selected {
  background: rgba(224, 138, 22, 0.16);
}

.module-table td:nth-child(3),
.module-table td:nth-child(4) {
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.module-table td:nth-child(5) {
  font-family: var(--font-mono);
  color: var(--amber-deep);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* Contact */
.contact-section {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(700px 320px at 90% 10%, rgba(224, 138, 22, 0.1), transparent 60%),
    radial-gradient(600px 280px at 0% 80%, rgba(31, 111, 106, 0.1), transparent 55%);
}

.contact-layout {
  display: grid;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

@media (min-width: 860px) {
  .contact-layout {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3.5rem;
  }
}

.contact-intro {
  margin-bottom: 0;
  max-width: 28rem;
}

.contact-direct {
  margin-top: 1.75rem;
}

.contact-direct-label {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.contact-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--amber);
  padding-bottom: 0.15rem;
  transition: color 0.2s, border-color 0.2s;
}

.contact-email:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.contact-direct-note {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.contact-form {
  max-width: 36rem;
}

.contact-form .btn {
  margin-top: 0.35rem;
}

.contact-status {
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ok);
}

.contact-status.is-error {
  color: var(--bad);
}

/* Blog */
.blog-page {
  padding: clamp(2.5rem, 7vh, 4.5rem) clamp(1.25rem, 4vw, 3rem) 1rem;
  max-width: 46rem;
  margin: 0 auto;
}

.blog-hero {
  margin-bottom: 2.75rem;
}

.blog-kicker {
  margin: 0 0 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.blog-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.blog-hero > p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 36ch;
}

.blog-list {
  display: grid;
  gap: 0;
}

.blog-post {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.blog-post:last-child {
  border-bottom: 1px solid var(--line);
}

.blog-post time {
  display: block;
  margin-bottom: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.blog-post h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.blog-post p {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
}

.blog-post p:last-child {
  margin-bottom: 0;
}

.blog-hub {
  max-width: 72rem;
}

.blog-hub .blog-hero {
  max-width: 40rem;
}

.blog-featured {
  margin-bottom: 3rem;
}

.blog-featured h2,
.blog-hub-section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
}

.blog-hub-lead {
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  max-width: 48ch;
}

.blog-feature-card,
.blog-index-card {
  display: grid;
  gap: 0.4rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.blog-feature-card {
  padding: 1.5rem 0 1.75rem;
  border-bottom: 1px solid var(--line);
}

.blog-feature-card:hover .blog-index-title,
.blog-index-card:hover .blog-index-title {
  color: var(--teal);
}

.blog-index-grid {
  display: grid;
  gap: 0;
}

@media (min-width: 800px) {
  .blog-index-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 2.5rem;
  }
}

.blog-index-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

.blog-index-title {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
}

.blog-index-desc {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.blog-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.blog-crumbs a {
  color: var(--teal);
  text-decoration: none;
}

.blog-crumbs a:hover {
  text-decoration: underline;
}

.blog-article .blog-hero time {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.blog-prose {
  display: grid;
  gap: 0.95rem;
}

.blog-prose h2 {
  margin: 1.1rem 0 0;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.blog-prose p,
.blog-prose li {
  margin: 0;
  color: var(--ink-soft);
}

.blog-prose ul,
.blog-prose ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
  color: var(--ink-soft);
}

.blog-prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--ink);
}

.blog-callout {
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.blog-callout strong {
  color: var(--ink);
}

.blog-related {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.blog-related h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.blog-related ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.4rem;
}

.blog-related p {
  margin: 0;
}

.footer-nav a[aria-current="page"] {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 0;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(14, 20, 27, 0.06), rgba(14, 20, 27, 0.1)),
    radial-gradient(700px 280px at 10% 0%, rgba(31, 111, 106, 0.12), transparent 60%);
}

.footer-inner {
  display: grid;
  gap: 2rem;
  padding: 2.75rem clamp(1.25rem, 4vw, 3rem) 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 800px) {
  .footer-inner {
    grid-template-columns: 1.6fr auto 1fr;
    align-items: start;
    gap: 3rem;
  }
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  text-decoration: none;
  color: var(--ink);
}

.footer-logo:hover {
  color: var(--ink);
}

.footer-logo .logo-mark {
  width: 2.4rem;
  height: 2.4rem;
}

.footer-brand .logo-text {
  font-size: 1.45rem;
  letter-spacing: 0.16em;
}

.footer-brand .logo-tag {
  font-size: 0.62rem;
}

.footer-brand p {
  margin: 0;
  max-width: 28rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-top: 0.35rem;
}

.footer-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s;
}

.footer-nav a:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.footer-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding-top: 0.35rem;
}

.footer-aside p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.footer-cta {
  text-decoration: none;
}

.footer-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 4vw, 3rem) 1.35rem;
  border-top: 1px solid var(--line);
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bar p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
