:root {
  color-scheme: light;
  --paper: #edf3ef;
  --ink: #17231f;
  --muted: #62716b;
  --line: #ccd8d1;
  --panel: #fbfdfb;
  --deep: #172b27;
  --signal: #c8ed54;
  --blue: #167a9b;
  --coral: #da7055;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(rgba(23, 35, 31, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(23, 35, 31, .035) 1px, transparent 1px);
  background-size: 32px 32px;
}

button, input { font: inherit; }
button { color: inherit; }

.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(28px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; color: var(--deep); background: var(--signal); border-radius: 50%; font-family: Georgia, serif; font-size: 19px; font-weight: 700; letter-spacing: 0; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.top-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font: 700 10px/1 monospace; letter-spacing: .08em; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px rgba(200, 237, 84, .2); }
.meta-divider { width: 1px; height: 14px; margin: 0 4px; background: var(--line); }

.shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.intro { min-height: 258px; display: flex; align-items: center; justify-content: space-between; padding: 28px 8px 24px; }
.eyebrow { margin: 0 0 12px; color: var(--blue); font: 700 10px/1.4 monospace; letter-spacing: .1em; }
.eyebrow span { color: var(--coral); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 13px; font: 400 52px/.99 Georgia, "Times New Roman", serif; letter-spacing: 0; }
h1 em { color: var(--blue); font-weight: 400; }
.lede { max-width: 525px; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.signal-art { position: relative; width: 210px; height: 180px; margin-right: 40px; }
.signal-ring { position: absolute; top: 50%; left: 50%; border: 1px solid #a8b9af; border-radius: 50%; transform: translate(-50%, -50%); }
.ring-one { width: 144px; height: 144px; }
.ring-two { width: 98px; height: 98px; border-style: dashed; }
.signal-core { position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; background: var(--signal); border: 7px solid var(--panel); border-radius: 50%; box-shadow: 0 0 0 1px var(--ink); transform: translate(-50%, -50%); }
.signal-label { position: absolute; top: 18px; right: 5px; padding: 8px 10px; color: var(--panel); background: var(--deep); font: 700 9px/1.4 monospace; letter-spacing: .1em; }

.primary-panel { overflow: hidden; padding: 25px 30px 0; color: #f4f8f4; background: var(--deep); border-radius: 5px; box-shadow: 0 14px 32px rgba(28, 51, 43, .12); }
.panel-topline, .panel-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.primary-panel .eyebrow { color: var(--signal); }
h2 { margin-bottom: 0; font: 400 25px/1.15 Georgia, "Times New Roman", serif; letter-spacing: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 9px; margin-top: 6px; padding: 8px 10px; color: #d9e5de; border: 1px solid #4b6359; border-radius: 2px; font: 700 9px/1 monospace; letter-spacing: .08em; }
.address-row { display: flex; align-items: center; justify-content: space-between; min-height: 124px; padding: 17px 0 20px; border-bottom: 1px solid #40554d; }
.field-label { display: block; margin-bottom: 10px; color: #a7b9af; font: 700 9px/1 monospace; letter-spacing: .1em; }
.ip-address { display: block; overflow-wrap: anywhere; color: var(--signal); font: 500 clamp(27px, 4vw, 46px)/1.12 "Cascadia Code", Consolas, monospace; }
.icon-button { display: grid; flex: 0 0 auto; width: 42px; height: 42px; place-items: center; border: 1px solid #64776e; border-radius: 3px; color: #f4f8f4; background: transparent; cursor: pointer; }
.icon-button:hover:not(:disabled) { color: var(--deep); background: var(--signal); border-color: var(--signal); }
.icon-button:disabled { opacity: .42; cursor: not-allowed; }
.copy-icon { position: relative; display: block; width: 14px; height: 15px; border: 1.5px solid currentColor; border-radius: 2px; }
.copy-icon::before { position: absolute; top: -5px; left: -5px; width: 10px; height: 12px; border: 1.5px solid currentColor; border-radius: 2px; background: var(--deep); content: ""; }
.icon-button:hover .copy-icon::before { background: var(--signal); }
.primary-footer { min-height: 60px; display: flex; align-items: center; gap: 34px; }
.data-pair { display: flex; align-items: center; gap: 9px; font: 700 9px/1 monospace; letter-spacing: .06em; }
.data-pair span { color: #a7b9af; }
.data-pair strong { color: #f4f8f4; font: 700 11px/1 monospace; }
.refresh-button { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; padding: 9px 12px; color: var(--deep); background: var(--signal); border: 0; border-radius: 2px; font-size: 12px; font-weight: 700; cursor: pointer; }
.refresh-button:hover { background: #daf38a; }
.refresh-button span { font-size: 16px; }

.detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; margin-top: 16px; }
.detail-panel { min-width: 0; min-height: 218px; padding: 22px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.panel-heading .eyebrow { margin-bottom: 9px; }
.panel-heading h2 { font-size: 22px; }
.panel-index { padding: 6px 8px; color: var(--blue); background: #e4f1f3; font: 700 9px/1 monospace; letter-spacing: .1em; }
.local-result { display: flex; align-items: center; gap: 11px; min-height: 56px; margin-top: 13px; padding: 10px 12px; background: #eef5ef; border-left: 3px solid var(--signal); }
.local-marker { flex: 0 0 auto; width: 9px; height: 9px; background: var(--coral); border-radius: 50%; }
.local-result output { min-width: 0; flex: 1; overflow-wrap: anywhere; font: 700 15px/1.35 "Cascadia Code", Consolas, monospace; }
.small-icon { width: 32px; height: 32px; color: var(--ink); border-color: #b7c7bd; }
.small-icon .copy-icon::before { background: #eef5ef; }
.small-icon:hover .copy-icon::before { background: var(--signal); }
.note { max-width: 440px; margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.context-list { margin: 17px 0 0; }
.context-list div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid #e5ebe7; font-size: 12px; }
.context-list dt { color: var(--muted); }
.context-list dd { overflow-wrap: anywhere; margin: 0; color: var(--ink); font-weight: 700; text-align: right; }

.inspector { display: grid; grid-template-columns: .9fr 1.1fr; gap: 42px; align-items: center; margin-top: 16px; padding: 24px 28px; background: #e1ece7; border: 1px solid #c6d5cd; border-radius: 4px; }
.inspector-intro h2 { margin-bottom: 8px; font-size: 23px; }
.inspector-intro > p:last-child { max-width: 390px; margin-bottom: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.inspect-form label { display: block; margin-bottom: 7px; color: var(--muted); font: 700 9px/1 monospace; letter-spacing: .1em; }
.input-line { display: flex; min-height: 44px; }
.input-line input { min-width: 0; flex: 1; padding: 0 12px; color: var(--ink); background: var(--panel); border: 1px solid #aabdb2; border-right: 0; border-radius: 3px 0 0 3px; font: 14px "Cascadia Code", Consolas, monospace; }
.input-line input:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.input-line button { padding: 0 17px; color: #fff; background: var(--blue); border: 0; border-radius: 0 3px 3px 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.input-line button:hover { background: #105c76; }
.inspect-result { min-height: 20px; margin: 9px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.inspect-result[data-state="error"] { color: #a54132; }
.inspect-result strong { color: var(--ink); }
.page-footer { display: flex; justify-content: space-between; gap: 16px; padding: 24px 2px 30px; color: #6e8076; font: 700 9px/1.4 monospace; letter-spacing: .06em; }
.page-footer i { margin: 0 6px; color: var(--coral); font-style: normal; }

button:focus-visible, a:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

@media (max-width: 700px) {
  .topbar { height: 64px; padding: 0 20px; }
  .top-meta { gap: 7px; font-size: 8px; }
  .shell { width: calc(100% - 32px); }
  .intro { min-height: auto; padding: 43px 4px 25px; }
  h1 { font-size: 43px; }
  .lede { max-width: 440px; font-size: 14px; }
  .signal-art { width: 92px; height: 100px; margin: 0 5px 0 8px; flex: 0 0 auto; }
  .ring-one { width: 82px; height: 82px; }
  .ring-two { width: 56px; height: 56px; }
  .signal-core { width: 28px; height: 28px; border-width: 5px; }
  .signal-label { top: 1px; right: -5px; padding: 5px 6px; font-size: 7px; }
  .primary-panel { padding: 21px 19px 0; }
  .address-row { min-height: 110px; }
  .ip-address { font-size: clamp(21px, 6vw, 34px); }
  .primary-footer { min-height: auto; flex-wrap: wrap; gap: 15px 20px; padding: 14px 0; }
  .refresh-button { margin-left: auto; }
  .detail-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }
  .detail-panel { min-height: auto; padding: 20px; }
  .inspector { grid-template-columns: 1fr; gap: 17px; margin-top: 12px; padding: 21px 20px; }
  .page-footer { flex-direction: column; gap: 7px; padding-bottom: 23px; }
}

@media (max-width: 390px) {
  .top-meta { font-size: 7px; }
  .meta-divider, .top-meta > span:last-child { display: none; }
  .intro { align-items: flex-start; }
  .signal-art { width: 70px; margin-top: 20px; }
  h1 { font-size: 38px; }
  .status-pill { padding: 7px; font-size: 7px; }
  .data-pair { gap: 5px; font-size: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .signal-ring { animation: orbit 24s linear infinite; }
  .ring-two { animation-direction: reverse; }
  @keyframes orbit { to { transform: translate(-50%, -50%) rotate(360deg); } }
}