:root {
  --blue-tint: #d5e3f4;
  --blue-light: #6e9dd8;
  --blue-bright: #1256a8;
  --blue-core: #004392;
  --blue-deep: #00305f;
  --blue-navy: #001730;
  --white: #ffffff;
  --paper: #f7f9fb;
  --line: #dfe5ea;
  --line-soft: #eef1f4;
  --muted: #97a4b0;
  --slate: #4e5d6c;
  --ink: #0e1622;
  --success: #1e8e5a;
  --danger: #c8452f;
  --shadow: 0 18px 45px rgba(14, 22, 34, 0.12);
  --radius: 10px;
  --font-display: "Saira Condensed", sans-serif;
  --font-body: "Hanken Grotesk", sans-serif;
  --font-mono: "Space Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
}

html[data-theme="dark"] body {
  background: var(--blue-navy);
  color: #eaf1f9;
}

::selection {
  background: var(--blue-core);
  color: var(--white);
}

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

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.dashboard-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .dashboard-shell {
  border-color: #143a63;
  background: #04264c;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(18, 86, 168, 0.82), rgba(0, 48, 95, 0.96) 48%, var(--blue-navy)),
    var(--blue-deep);
  color: var(--white);
  padding: 34px 38px 46px;
}

.hero-watermark {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  opacity: 0.08;
  pointer-events: none;
}

.brand-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-link img {
  width: 248px;
  height: auto;
}

.team-label,
.eyebrow,
.result-summary,
.url-display,
.empty-kicker {
  font-family: var(--font-mono);
}

.team-label {
  color: var(--blue-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #c2cbd4;
  cursor: pointer;
  user-select: none;
}

.theme-toggle-text {
  min-width: 34px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: right;
  text-transform: uppercase;
}

.theme-toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.theme-toggle-track {
  position: relative;
  width: 48px;
  height: 26px;
  border: 1px solid rgba(166, 196, 233, 0.58);
  border-radius: 999px;
  background: rgba(0, 23, 48, 0.58);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.theme-toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
  transition: transform 0.15s, background 0.15s;
}

.theme-toggle-input:checked + .theme-toggle-track {
  border-color: var(--blue-light);
  background: var(--blue-core);
}

.theme-toggle-input:checked + .theme-toggle-track .theme-toggle-thumb {
  transform: translateX(22px);
}

.theme-toggle-input:focus-visible + .theme-toggle-track {
  box-shadow: 0 0 0 4px rgba(110, 157, 216, 0.24);
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 42px;
  align-items: end;
  margin-top: 64px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.26em;
}

h1 {
  max-width: 690px;
  margin: 0;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 5.25rem;
  font-style: italic;
  font-weight: 800;
  line-height: 0.88;
  text-transform: uppercase;
}

.search-panel {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(0, 23, 48, 0.54);
  padding: 18px;
}

.search-field {
  position: relative;
}

.search-symbol {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--blue-light);
  border-radius: 999px;
  transform: translateY(-55%);
}

.search-symbol::after {
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  background: var(--blue-light);
  border-radius: 2px;
  content: "";
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-field input {
  width: 100%;
  height: 54px;
  border: 1.5px solid rgba(166, 196, 233, 0.46);
  border-radius: var(--radius);
  outline: none;
  background: var(--white);
  color: var(--ink);
  padding: 0 16px 0 46px;
  font-size: 1rem;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-field input:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 4px rgba(110, 157, 216, 0.22);
}

.result-summary {
  min-height: 20px;
  margin: 13px 0 0;
  color: #a6c4e9;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.results-area {
  padding: 34px 38px 42px;
  background: var(--paper);
}

html[data-theme="dark"] .results-area {
  background: var(--blue-navy);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.app-card {
  position: relative;
  display: flex;
  min-height: 258px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

html[data-theme="dark"] .app-card {
  border-color: #143a63;
  background: #04264c;
}

.app-card::before {
  display: block;
  height: 7px;
  background: var(--blue-core);
  content: "";
}

.app-card:hover {
  border-color: #a6c4e9;
  box-shadow: 0 16px 32px rgba(14, 22, 34, 0.11);
  transform: translateY(-2px);
}

html[data-theme="dark"] .app-card:hover {
  border-color: var(--blue-light);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.card-body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.card-mark {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 74px;
  height: 74px;
  opacity: 0.06;
  pointer-events: none;
}

html[data-theme="dark"] .card-mark {
  opacity: 0.08;
}

.app-card h2 {
  max-width: calc(100% - 64px);
  margin: 0;
  color: var(--blue-deep);
  font-family: var(--font-display);
  font-size: 2rem;
  font-style: italic;
  font-weight: 700;
  line-height: 0.96;
  text-transform: uppercase;
}

html[data-theme="dark"] .app-card h2 {
  color: #eaf1f9;
}

.app-card p {
  margin: 0;
}

.app-description {
  margin-top: 16px;
  color: var(--slate);
  font-size: 0.96rem;
  line-height: 1.58;
}

html[data-theme="dark"] .app-description {
  color: #9db4ce;
}

.card-actions {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 28px;
}

.url-display {
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

html[data-theme="dark"] .url-display {
  color: var(--blue-light);
}

.open-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  background: var(--blue-core);
  color: var(--white);
  padding: 0 18px;
  font-size: 0.9rem;
  font-weight: 800;
  transition: background 0.15s, box-shadow 0.15s;
}

html[data-theme="dark"] .open-link {
  background: #2e6dbe;
}

.open-link:hover,
.open-link:focus-visible {
  background: var(--blue-deep);
}

html[data-theme="dark"] .open-link:hover,
html[data-theme="dark"] .open-link:focus-visible {
  background: var(--blue-bright);
}

.open-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 67, 146, 0.18);
}

.open-link[aria-disabled="true"] {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

html[data-theme="dark"] .open-link[aria-disabled="true"] {
  background: #143a63;
  color: #9db4ce;
}

.status-message {
  display: grid;
  min-height: 300px;
  place-items: center;
  border: 1px dashed #a6c4e9;
  border-radius: var(--radius);
  background: var(--white);
  padding: 42px 28px;
  text-align: center;
}

html[data-theme="dark"] .status-message {
  border-color: #143a63;
  background: #04264c;
}

.status-message[hidden] {
  display: none;
}

.status-message img {
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
}

.status-message h2 {
  margin: 0;
  color: var(--blue-deep);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-style: italic;
  line-height: 0.95;
  text-transform: uppercase;
}

html[data-theme="dark"] .status-message h2 {
  color: #eaf1f9;
}

.status-message p {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--slate);
  line-height: 1.55;
}

html[data-theme="dark"] .status-message p {
  color: #9db4ce;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 24px, 760px);
    padding-top: 20px;
  }

  .dashboard-shell {
    border-radius: 14px;
  }

  .hero {
    padding: 26px 24px 34px;
  }

  .brand-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .brand-actions {
    width: 100%;
    justify-content: space-between;
  }

  .brand-link img {
    width: 220px;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 48px;
  }

  h1 {
    font-size: 4.1rem;
  }

  .results-area {
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: 100%;
    padding-top: 0;
  }

  .dashboard-shell {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .hero {
    padding: 24px 18px 28px;
  }

  .hero-watermark {
    right: -160px;
    top: -130px;
    width: 360px;
    height: 360px;
  }

  .brand-link img {
    width: 196px;
  }

  .team-label,
  .eyebrow,
  .result-summary {
    font-size: 0.68rem;
  }

  h1 {
    font-size: 3.2rem;
  }

  .search-panel,
  .results-area {
    padding: 18px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }

  .card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .open-link {
    width: 100%;
  }
}
