:root {
  color-scheme: light;
  --brand-blue: #00a0dc;
  --brand-blue-dark: #0077b6;
  --brand-blue-soft: #dff4fb;
  --brand-dark: #0f172a;
  --brand-ink: #162033;
  --bg: #f3f7fb;
  --bg-light: #f6f9fc;
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.16);
  --card-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
  --card-shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --text-muted: #5f6b7a;
  --text-soft: #7a8697;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: #1b1f24;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f6fb 100%);
}

a {
  color: var(--brand-blue-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-blue);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

code {
  display: inline-block;
  padding: 0.14em 0.45em;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--brand-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page.home {
  background:
    radial-gradient(circle at top left, rgba(0, 160, 220, 0.16), transparent 34%),
    radial-gradient(circle at top right, rgba(0, 119, 182, 0.1), transparent 22%),
    linear-gradient(180deg, #f8fcff 0%, #eef4fa 100%);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding-inline: 24px;
  width: 100%;
}

.site-header {
  position: relative;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.brand-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.18s ease;
}

.brand-logo-link:hover {
  opacity: 0.82;
}

.brand-logo {
  aspect-ratio: 563 / 183;
  flex: 0 0 auto;
  height: 56px;
  width: auto;
  object-fit: contain;
}

.brand-divider {
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.18), transparent);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-ink);
  letter-spacing: 0.01em;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.brand-badge {
  aspect-ratio: 488 / 415;
  flex: 0 0 auto;
  height: 54px;
  width: auto;
  border-radius: 10px;
  object-fit: contain;
}

.brand-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--brand-ink);
  white-space: nowrap;
  transition: color 0.18s ease;
}

.brand-phone:hover {
  color: var(--brand-blue-dark);
}

.brand-phone-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-soft);
}

.brand-phone-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-ink);
  letter-spacing: 0.01em;
}

.brand-phone-icon {
  display: none;
}

.card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(12px);
}

.home-main {
  flex: 1;
  padding-block: 56px 72px;
}

.home-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 44px;
  align-items: center;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 40px;
  color: #fff;
  background: linear-gradient(155deg, #0f172a 0%, #124b74 56%, #00a0dc 100%);
}

.hero-panel::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 70%);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 31px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.hero-panel > * {
  position: relative;
  z-index: 1;
}

.hero-panel code {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  max-width: 10ch;
}

.hero-intro {
  margin: 0;
  max-width: 620px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.84);
}

.home-search-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 0 8px 30px;
  border-left: 3px solid var(--brand-blue);
}

.resolve-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 0;
  align-items: stretch;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-ink);
  letter-spacing: 0.02em;
}

input[type="url"],
input[type="text"] {
  width: 100%;
  padding: 15px 16px;
  font-size: 15px;
  color: var(--brand-ink);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(255, 255, 255, 0.98);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input[type="url"]::placeholder,
input[type="text"]::placeholder {
  color: #8a96a8;
}

input[type="url"]:focus,
input[type="text"]:focus {
  border-color: var(--brand-blue-dark);
  box-shadow:
    0 0 0 4px rgba(0, 160, 220, 0.14),
    0 12px 24px rgba(0, 160, 220, 0.08);
  background: #fff;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

button {
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0, 119, 182, 0.28);
}

button:active {
  transform: translateY(0);
}

button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(0, 160, 220, 0.16),
    0 16px 32px rgba(0, 119, 182, 0.24);
}

.home-guidance {
  margin-top: 46px;
  padding-top: 32px;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
}

.guidance-copy h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--brand-dark);
}

.guidance-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.alert {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 14px;
}

/* Informational banner (for example plot-archive reports), as opposed to the
   error styling of .alert. */
.notice {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--brand-blue-soft);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 14px;
}

.hint {
  color: var(--text-muted);
  font-size: 13px;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

.section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 16px;
}

.site-footer {
  background: rgba(8, 15, 26, 0.94);
  color: #fff;
  padding: 28px 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
}

.footer-links a {
  color: rgba(230, 236, 244, 0.74);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

@media (max-width: 1080px) {
  .home-shell {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-panel h1 {
    max-width: 12ch;
  }

  .home-search-panel {
    padding-left: 24px;
  }
}

@media (max-width: 860px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    padding-inline: 16px;
  }

  .header-inner {
    gap: 12px;
    justify-content: center;
    padding: 14px 0;
  }

  .brand-left {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
  }

  .brand-logo {
    height: 44px;
  }

  .brand-divider {
    display: none;
  }

  .brand-copy {
    display: contents;
  }

  .brand-logo-link {
    order: 1;
    width: 100%;
  }

  .brand-sub {
    order: 2;
    width: 100%;
    text-align: center;
  }

  .brand-name {
    order: 3;
    width: 100%;
    text-align: center;
  }

  .brand-right {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }

  .brand-badge {
    height: 42px;
  }

  .brand-phone {
    align-items: center;
    text-align: center;
    gap: 2px;
  }

  .brand-phone-number {
    font-size: 16px;
  }

  .home-main {
    padding-block: 28px 48px;
  }

  .hero-panel,
  .card {
    padding: 24px;
    border-radius: 24px;
  }

  .home-search-panel {
    padding: 24px 0 0;
    border-top: 3px solid var(--brand-blue);
    border-left: none;
  }

  .home-guidance {
    margin-top: 34px;
    padding-top: 26px;
  }

  .hero-panel h1 {
    font-size: 32px;
    max-width: none;
  }

  .hero-intro {
    font-size: 16px;
  }

  .form-actions {
    align-items: stretch;
  }

  .form-actions button {
    width: 100%;
  }

  .footer-inner {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .brand-right {
    align-items: center;
    flex-direction: column;
  }

  .brand-copy {
    width: 100%;
  }

  .brand-name {
    font-size: 16px;
  }

  .brand-sub,
  .brand-phone-label {
    letter-spacing: 0.1em;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    background: #fff;
  }

  .page.home {
    background: #fff;
  }

  .no-print {
    display: none !important;
  }

  .site-header {
    border-bottom-color: #000;
    box-shadow: none;
    backdrop-filter: none;
  }

  .brand-logo-link,
  .brand-phone,
  .card {
    box-shadow: none;
    background: #fff;
  }

  .hero-panel {
    background: #fff;
    color: #000;
    box-shadow: none;
  }

  .hero-panel::before,
  .hero-panel::after {
    display: none;
  }

  .hero-intro {
    color: #000;
  }

  .site-footer {
    display: none;
  }
}

/* ---- Dark theme (opt-in via admin cookie → data-theme="dark") ---- */

html[data-theme="dark"] {
  color-scheme: dark;
  --brand-blue: #3eb8e8;
  --brand-blue-dark: #5cc8f0;
  --brand-blue-soft: rgba(62, 184, 232, 0.16);
  --brand-dark: #e8eef7;
  --brand-ink: #e8eef7;
  --bg: #12161f;
  --bg-light: #161b26;
  --border: rgba(232, 238, 247, 0.12);
  --border-strong: rgba(232, 238, 247, 0.2);
  --card-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  --card-shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
  --text-muted: #9aa6b8;
  --text-soft: #7f8b9e;
}

html[data-theme="dark"] body {
  color: #e8eef7;
  background: linear-gradient(180deg, #151a24 0%, #10141c 100%);
}

html[data-theme="dark"] .page.home {
  background:
    radial-gradient(circle at top left, rgba(62, 184, 232, 0.14), transparent 34%),
    radial-gradient(circle at top right, rgba(0, 119, 182, 0.12), transparent 22%),
    linear-gradient(180deg, #151a24 0%, #10141c 100%);
}

html[data-theme="dark"] .site-header {
  background: rgba(22, 27, 38, 0.94);
  border-bottom-color: rgba(232, 238, 247, 0.1);
}

html[data-theme="dark"] .brand-divider {
  background: linear-gradient(180deg, transparent, rgba(232, 238, 247, 0.22), transparent);
}

html[data-theme="dark"] .card {
  background: rgba(28, 34, 48, 0.92);
}

html[data-theme="dark"] .hero-panel {
  background: linear-gradient(155deg, #0a1018 0%, #0d3a58 56%, #0077b6 100%);
}

html[data-theme="dark"] code {
  background: rgba(232, 238, 247, 0.1);
  color: var(--brand-ink);
}

html[data-theme="dark"] .home-search-panel {
  border-left-color: var(--brand-blue);
}

html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="text"] {
  background: #1c2230;
  color: var(--brand-ink);
  border-color: var(--border-strong);
}

html[data-theme="dark"] input[type="url"]:focus,
html[data-theme="dark"] input[type="text"]:focus {
  background: #222938;
}

html[data-theme="dark"] .site-footer {
  background: rgba(18, 22, 31, 0.96);
  border-top-color: var(--border);
}

@media print {
  html[data-theme="dark"] {
    color-scheme: light;
    --brand-blue: #00a0dc;
    --brand-blue-dark: #0077b6;
    --brand-blue-soft: #dff4fb;
    --brand-dark: #0f172a;
    --brand-ink: #162033;
    --bg: #f3f7fb;
    --bg-light: #f6f9fc;
    --border: rgba(15, 23, 42, 0.1);
    --border-strong: rgba(15, 23, 42, 0.16);
    --text-muted: #5f6b7a;
    --text-soft: #7a8697;
  }

  html[data-theme="dark"] body,
  html[data-theme="dark"] .page.home {
    background: #fff;
    color: #1b1f24;
  }
}

