@font-face {
  font-family: "Inconsolata";
  font-style: normal;
  font-weight: 200 900;
  font-stretch: 100%;
  font-display: swap;
  src: url(https://equinox.netigen.com/fonts/Inconsolata.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --bg: #f4f4f2;
  --text: #222421;
  --muted: #777a74;
  --surface: #fbfbfa;
  --surface-muted: #eeeeeb;
  --surface-strong: #dfdfda;
  --line: #d6d7d1;
  --line-soft: #e5e5e1;
  --accent: #2f342f;
  --accent-hover: #1d211d;
  --accent-soft: #e7e8e4;
  --accent-focus: #5d625c;
  --accent-text: #ffffff;
  --danger: #9a332e;
  --warning: #756039;
  --warning-soft: #f6f1e7;
  --warning-line: #d6c7a7;
  --preview-edge: #a9aba5;
  --preview-glow: rgba(32, 34, 31, 0.08);
  --pane-light: #ffffff;
  --pane-dark: #151515;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101110;
    --text: #e7e7e3;
    --muted: #8b8e87;
    --surface: #171817;
    --surface-muted: #20211f;
    --surface-strong: #2a2c28;
    --line: #32342f;
    --line-soft: #252724;
    --accent: #3d413c;
    --accent-hover: #4c514b;
    --accent-soft: #272926;
    --accent-focus: #9a9f96;
    --accent-text: #f0f0ec;
    --danger: #df645d;
    --warning: #c2aa76;
    --warning-soft: #282317;
    --warning-line: #50472f;
    --preview-edge: #555852;
    --preview-glow: rgba(0, 0, 0, 0.42);
    --pane-light: #f7f7f4;
    --pane-dark: #050505;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Inconsolata", monospace;
}

button,
input {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 12px;
}

.url {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.url-label {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.url-input {
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.url-input::placeholder {
  color: color-mix(in srgb, var(--muted), transparent 28%);
}

.url-input:focus-visible {
  border-color: var(--accent-focus);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-focus), transparent 72%);
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  border: 1px solid var(--line);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  min-width: 82px;
  height: 42px;
  padding: 0 18px;
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  min-width: 68px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--accent-soft);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-focus);
  outline-offset: 2px;
}

.btn.is-disabled {
  color: var(--muted);
  pointer-events: none;
}

.notice-jump {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--warning-line);
  border-radius: 3px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.notice-jump:hover {
  background: color-mix(in srgb, var(--warning-soft), var(--warning) 14%);
}

.notice-jump:focus-visible {
  outline: 2px solid var(--warning);
  outline-offset: 2px;
}

.previews {
  min-height: calc(100vh - 112px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.preview {
  --pane-mark: var(--accent);
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--preview-edge);
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--text);
  box-shadow: 0 14px 36px var(--preview-glow);
}

.preview-light {
  --pane-mark: var(--pane-light);
}

.preview-dark {
  --pane-mark: var(--pane-dark);
}

.preview-header {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.preview-header > div:first-child {
  min-width: 0;
}

.preview-label,
.preview-title {
  margin: 0;
}

.preview-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.preview-label::before {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid var(--preview-edge);
  border-radius: 50%;
  background: var(--pane-mark);
}

.preview-title {
  max-width: min(46vw, 580px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.preview-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.frame {
  min-height: 0;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-strong);
}

iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: canvas;
}

.preview-light iframe {
  color-scheme: light;
}

.preview-dark iframe {
  color-scheme: dark;
}

.footer {
  display: grid;
  justify-items: stretch;
}

.status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.status[data-tone="error"] {
  color: var(--danger);
}

.notice {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--warning-line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.notice-title {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.notice-copy {
  margin: 0;
}

.notice-copy + .notice-copy {
  margin-top: 6px;
}

.notice-link {
  color: var(--text);
  font-weight: 700;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}

.notice-link:hover {
  color: var(--accent);
}

.notice-list {
  margin: 6px 0 0;
  padding-left: 18px;
}

.notice-list li + li {
  margin-top: 2px;
}

@media (max-width: 820px) {
  .app {
    padding: 8px;
  }

  .url {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .url-label {
    grid-column: 1 / -1;
  }

  .previews {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(58vh, 1fr);
  }

  .preview-title {
    max-width: calc(100vw - 190px);
  }
}

@media (max-width: 480px) {
  .url {
    grid-template-columns: 1fr;
  }

  .url-label,
  .btn-primary,
  .notice-jump {
    width: 100%;
  }

  .preview-header {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .btn-secondary {
    width: 100%;
  }

  .preview-title {
    max-width: 100%;
  }
}
