:root {
  --bg: #f6f8fb;
  --bg-strong: #edf2f7;
  --surface: #ffffff;
  --surface-soft: #f9fbfd;
  --ink: #111827;
  --ink-soft: #273244;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #d8e1ea;
  --line-soft: #e8eef5;
  --teal: #0f766e;
  --teal-2: #14b8a6;
  --blue: #2563eb;
  --blue-soft: #eaf1ff;
  --amber: #b45309;
  --amber-soft: #fff7e6;
  --red: #b42318;
  --red-soft: #fff0ef;
  --green-soft: #e8f7f4;
  --violet: #6d5bd0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.12);
  --radius: 8px;
  --sidebar: #0d1520;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #fbfcfe 0, #f1f5f9 360px, #f6f8fb 100%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

::selection {
  background: rgba(20, 184, 166, 0.22);
}

.layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 16px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(20, 184, 166, 0.12), rgba(37, 99, 235, 0.04) 28%, rgba(13, 21, 32, 0) 64%),
    var(--sidebar);
  color: #f8fafc;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: #ffffff;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, #18c3b2, #2f7df0);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(20, 184, 166, 0.28);
  font-weight: 950;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  line-height: 1.1;
}

.brand small {
  margin-top: 3px;
  color: #aab7c4;
}

.nav {
  display: grid;
  gap: 7px;
  margin: 30px 0 22px;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav a::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 2px solid rgba(203, 213, 225, 0.48);
  border-radius: 999px;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.075);
  color: #ffffff;
  transform: translateX(1px);
}

.nav a.active {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.nav a.active::before {
  border-color: #2dd4bf;
  background: #2dd4bf;
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.15);
}

.side-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.side-meta span,
.eyebrow,
.field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-meta span {
  color: #9fafbd;
}

.side-meta code,
.side-meta strong {
  color: #ffffff;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.45;
}

.main {
  min-width: 0;
  width: 100%;
  max-width: 1540px;
  padding: 30px;
}

.topbar,
.panel-head,
.top-actions,
.toolbar,
.dialog-actions,
.analytics-picker,
.switch-row,
.link-actions,
.link-row-main,
.link-row-meta,
.selected-link {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  color: var(--ink);
  font-size: 36px;
  line-height: 1.06;
  font-weight: 950;
}

.eyebrow {
  margin: 0 0 6px;
}

.top-actions {
  justify-content: flex-end;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 15px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: linear-gradient(180deg, #159c91, #0f766e);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.18);
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #14a99c, #0b6f68);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.24);
}

.button:active {
  transform: translateY(0);
}

.button.subtle {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.button.subtle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.button.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

.button.danger {
  background: linear-gradient(180deg, #c24137, #a92318);
  border-color: #b42318;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(180, 35, 24, 0.16);
}

.button.small {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 7px;
}

.full {
  width: 100%;
}

.status,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #eef2f7;
  color: #536176;
  font-size: 12px;
  font-weight: 950;
}

.pill.active,
.status.normal {
  background: var(--green-soft);
  color: var(--teal);
  border-color: rgba(15, 118, 110, 0.12);
}

.pill.inactive,
.status.under_attack {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(180, 35, 24, 0.14);
}

.pill.watch,
.status.watch {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: rgba(180, 83, 9, 0.16);
}

.pill.neutral,
.status.neutral {
  background: #eef2f7;
  color: #536176;
  border-color: rgba(100, 116, 139, 0.14);
}

.pill-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.metric,
.panel,
.link-card,
.selected-link {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.metric {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 136px;
  padding: 19px;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.metric:nth-child(2)::before {
  background: linear-gradient(90deg, var(--blue), var(--violet));
}

.metric:nth-child(3)::before {
  background: linear-gradient(90deg, var(--amber), #f59e0b);
}

.metric:nth-child(4)::before {
  background: linear-gradient(90deg, #64748b, #0f766e);
}

.metric span,
.metric small {
  color: var(--muted);
}

.metric span {
  font-weight: 800;
}

.metric strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
  font-weight: 950;
}

.grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  min-width: 0;
  padding: 19px;
}

.panel:hover,
.metric:hover,
.link-card:hover {
  border-color: #cbd7e3;
}

.compact-panel {
  margin-bottom: 16px;
}

.panel-head {
  justify-content: space-between;
  min-height: 38px;
  margin-bottom: 17px;
}

.panel-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 950;
}

.text-link {
  color: var(--teal);
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
}

.text-link:hover {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.daily-chart,
.hour-chart {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 224px;
  padding-top: 8px;
}

.bar-column {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  min-width: 0;
  flex: 1;
  height: 100%;
}

.bar-track {
  position: relative;
  display: flex;
  align-items: end;
  height: 100%;
  border: 1px solid #e7eef6;
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(241, 245, 249, 0.8)),
    #eef3f7;
  overflow: hidden;
}

.bar-track::before {
  content: "";
  position: absolute;
  inset: 33.33% 0 auto;
  height: 1px;
  background: rgba(148, 163, 184, 0.18);
  box-shadow: 0 48px 0 rgba(148, 163, 184, 0.14);
}

.bar {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 3px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #2dd4bf, #0f766e);
  box-shadow: 0 -8px 18px rgba(20, 184, 166, 0.18);
}

.hour-chart {
  gap: 5px;
}

.hour-chart .bar {
  background: linear-gradient(180deg, #f59e0b, #b45309);
  box-shadow: 0 -8px 18px rgba(245, 158, 11, 0.16);
}

.bar-label {
  display: grid;
  gap: 3px;
  min-height: 31px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
}

.bar-label strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.breakdown,
.stack-list,
.kv-list,
.latency-grid,
.link-list,
.link-form {
  display: grid;
  gap: 12px;
}

.break-row {
  display: grid;
  gap: 7px;
}

.break-meta,
.kv-row,
.latency-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.break-meta span,
.kv-row span,
.latency-row span {
  color: var(--muted);
}

.break-meta strong,
.kv-row strong,
.latency-row strong {
  color: var(--ink-soft);
  font-weight: 900;
  text-align: right;
}

.break-track {
  height: 9px;
  border-radius: 999px;
  background: #eef3f7;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

.break-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal-2));
}

.stack-item {
  display: grid;
  gap: 7px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

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

.stack-item strong,
.stack-item small {
  overflow-wrap: anywhere;
}

.stack-item small {
  color: var(--muted);
  white-space: pre-line;
}

.split-page {
  display: grid;
  grid-template-columns: minmax(330px, 450px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.form-panel {
  position: sticky;
  top: 26px;
}

.field,
.link-form label {
  display: grid;
  gap: 7px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
  outline: none;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
  color: #a5b1c2;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.72);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.13);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.switch,
.link-form label.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-weight: 900;
}

.link-form label.switch {
  width: auto;
}

.switch input {
  position: absolute;
  width: 1px;
  min-width: 0;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: #c9d4e0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.1);
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: linear-gradient(90deg, var(--teal), var(--teal-2));
}

.switch input:checked + span::after {
  transform: translateX(16px);
}

.toolbar {
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.search {
  width: min(560px, 100%);
}

.link-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 17px;
  overflow: hidden;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.link-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--teal-2), var(--blue));
}

.link-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.user-list {
  display: grid;
  gap: 12px;
}

.user-card .short-url strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.user-switch {
  align-self: end;
  min-height: 42px;
}

.link-row-main,
.link-row-meta {
  justify-content: space-between;
}

.short-url {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.short-url a {
  color: var(--teal-dark);
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 950;
  text-decoration: none;
}

.short-url a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.short-url small,
.destination,
.link-row-meta {
  color: var(--muted);
  overflow-wrap: anywhere;
  font-size: 13px;
}

.destination {
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
}

.active-destination {
  display: grid;
  gap: 4px;
}

.active-destination span,
.url-line span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.active-destination strong,
.url-line strong {
  color: var(--ink-soft);
  overflow-wrap: anywhere;
  font-size: 13px;
}

.url-stack,
.nawala-link-list {
  display: grid;
  gap: 10px;
}

.url-line {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.url-line.selected {
  border-color: rgba(20, 184, 166, 0.3);
  background: linear-gradient(180deg, #ffffff, #f3fffc);
}

.link-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 9px;
}

.stat-chip {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.stat-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.stat-chip strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
}

.selected-link {
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 15px 17px;
  border-color: rgba(20, 184, 166, 0.3);
  background: linear-gradient(180deg, #ffffff, #f6fffd);
}

.selected-link strong,
.selected-link small {
  display: block;
  overflow-wrap: anywhere;
}

.selected-link small {
  margin-top: 4px;
  color: var(--muted);
}

.analytics-picker {
  align-items: end;
}

.analytics-picker .field {
  flex: 1;
}

.request-table {
  overflow-x: auto;
}

.request-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.request-table th,
.request-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  font-size: 13px;
}

.request-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.empty {
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.92));
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

dialog {
  width: min(92vw, 430px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
}

dialog::backdrop {
  background: rgba(10, 17, 27, 0.56);
}

.dialog-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.dialog-actions {
  justify-content: flex-end;
}

.toast {
  position: fixed;
  right: 20px;
  left: 20px;
  bottom: 20px;
  z-index: 20;
  width: auto;
  max-width: 360px;
  margin-left: auto;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: #111922;
  color: #ffffff;
  box-shadow: 0 18px 60px rgba(16, 24, 32, 0.24);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(45, 212, 191, 0.16), transparent 34%),
    radial-gradient(circle at 82% 28%, rgba(96, 165, 250, 0.14), transparent 32%),
    linear-gradient(180deg, #0b1220, #0d1622 52%, #0a1019);
}

.auth-shell {
  width: min(100%, 470px);
}

.auth-card {
  display: grid;
  gap: 22px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.075);
  color: #f8fafc;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.wide-auth-card {
  width: min(100%, 680px);
}

.auth-shell:has(.wide-auth-card) {
  width: min(100%, 680px);
}

.auth-brand {
  width: fit-content;
}

.auth-card h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(34px, 8vw, 52px);
  line-height: 1;
  font-weight: 950;
}

.auth-copy {
  margin: 12px 0 0;
  color: #b9c6d3;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-card .field span,
.auth-card .eyebrow {
  color: #9fb0c1;
}

.auth-card input {
  background: rgba(255, 255, 255, 0.94);
}

.page-status-list {
  display: grid;
  gap: 12px;
}

.page-status-card .request-table table {
  min-width: 680px;
}

.page-status-url {
  max-width: 460px;
}

.page-status-url code,
.header-value,
.redirect-chain code {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.page-status-url small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.slot-name {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-status-detail {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tabs .button.active {
  border-color: rgba(15, 118, 110, 0.35);
  background: var(--green-soft);
  color: var(--teal);
}

.detail-subhead {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.detail-note {
  color: var(--muted);
  font-size: 12px;
}

.challenge-note {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid rgba(180, 83, 9, 0.18);
  border-radius: 8px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 13px;
}

.challenge-note strong {
  font-weight: 950;
}

.preview-frame {
  width: 100%;
  min-height: 440px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #ffffff;
}

.body-preview {
  max-height: 320px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.redirect-chain {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.redirect-chain li {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.cloak-form {
  display: grid;
  gap: 12px;
}

.cloak-inline {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.cloak-form textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.cloak-subhead {
  margin-top: 18px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .layout,
  .split-page,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .form-panel {
    position: static;
    height: auto;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav {
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  }

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

@media (max-width: 720px) {
  .main {
    padding: 18px;
  }

  .sidebar {
    padding: 18px;
  }

  .topbar,
  .toolbar,
  .analytics-picker,
  .selected-link,
  .link-row-main,
  .link-row-meta,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar h1 {
    font-size: 29px;
  }

  .metrics,
  .field-row,
  .nav,
  .link-stats,
  .url-line {
    grid-template-columns: 1fr;
  }

  .daily-chart,
  .hour-chart {
    height: 184px;
  }

  .hour-chart .bar-label span {
    display: none;
  }

  .button,
  select,
  .search {
    width: 100%;
  }

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