:root {
  --bg: #f7f8fa;
  --fg: #0b1220;
  --muted: #5b657a;
  --primary: #256fa4;
  --primary-dark: #1e5d8a;
  --primary-soft: #eaf6ff;
  --primary-border: #cfe9fb;
  --primary-contrast: #ffffff;
  --surface: #ffffff;
  --surface-subtle: #fbfcfe;
  --border: #e5e7eb;
  --danger: #b42318;
  --danger-soft: #fff4f3;
  --danger-border: #ffd5d2;
  --notice-bg: #f3f9fd;
  --notice-border: #cfe9fb;
  --shadow: 0 14px 34px rgba(11, 18, 32, 0.08);
  --shadow-soft: 0 8px 24px rgba(11, 18, 32, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f16;
    --fg: #e5e7eb;
    --muted: #a3adc2;
    --primary: #4ea0d4;
    --primary-dark: #7ab9df;
    --primary-soft: #102536;
    --primary-border: #1f4b69;
    --primary-contrast: #071019;
    --surface: #111827;
    --surface-subtle: #0f1420;
    --border: #253044;
    --danger: #f97066;
    --danger-soft: #291716;
    --danger-border: #663331;
    --notice-bg: #102536;
    --notice-border: #1f4b69;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font:
    16px/1.6 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Inter,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Helvetica Neue',
    Arial,
    sans-serif;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

img,
iframe {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

a {
  color: var(--primary);
  font-weight: 600;
}

a:hover {
  color: var(--primary-dark);
}

code {
  padding: 0.08em 0.28em;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--fg);
  font-family: Consolas, 'SFMono-Regular', Menlo, Monaco, monospace;
  font-size: 0.92em;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin: 0.28rem 0;
}

.recovery-steps {
  display: flex;
  margin: 0;
  padding: 0;
  flex-direction: column;
  counter-reset: recovery-step;
  gap: 16px;
  list-style: none;
}

.recovery-steps > li {
  position: relative;
  min-height: 28px;
  padding-left: 42px;
  counter-increment: recovery-step;
}

.recovery-steps > li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-contrast);
  content: counter(recovery-step);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.recovery-steps p {
  margin: 0;
}

.instruction-screenshot {
  display: block;
  width: 100%;
  height: auto;
  margin: 10px 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.external-link::after {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.2em;
  background: currentColor;
  content: '';
  -webkit-mask: url('./external-link.svg') center / contain no-repeat;
  mask: url('./external-link.svg') center / contain no-repeat;
  vertical-align: -0.05em;
}

.container {
  width: min(960px, calc(100vw - 32px));
  margin: 0 auto;
}

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

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.header-title,
.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand {
  color: var(--primary);
  text-decoration: none;
}

.brand:hover,
.brand:focus {
  color: var(--primary);
  text-decoration: none;
}

.brand-mark,
.brand > img {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.brand-mark {
  width: 48px;
  height: 48px;
}

.brand-mark img {
  display: block;
  width: 48px;
  height: 48px;
}

.brand > img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(37, 111, 164, 0.12);
}

.header-copy {
  display: flex;
  min-width: 0;
  min-height: 48px;
  flex-direction: column;
  justify-content: center;
}

.header-copy h1,
.utility-brand-title,
.brand .name {
  margin: 0;
  color: var(--primary);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.header-copy h1,
.utility-brand-title {
  color: var(--fg);
  font-size: 1.45rem;
}

.header-copy p {
  margin: 4px 0 0;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.panel {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-body {
  padding: 24px;
}

.content-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content-stack > * {
  margin-top: 0;
  margin-bottom: 0;
}

.content-stack h1,
.content-stack h2 {
  color: var(--fg);
  font-size: 1.48rem;
  line-height: 1.28;
}

.content-stack h2.danger-title {
  color: var(--danger);
}

.status-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #fcd34d;
  border-radius: 50%;
  background: #fffbeb;
  color: #b45309;
  font-size: 1.25rem;
  font-weight: 800;
}

@media (prefers-color-scheme: dark) {
  .status-icon {
    border-color: #92400e;
    background: #2b2110;
    color: #fbbf24;
  }
}

.recovery-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.recovery-heading h1 {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.lead {
  max-width: 68ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.62rem 0.95rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-contrast);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.08s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
  box-shadow: 0 5px 14px rgba(37, 111, 164, 0.18);
}

.btn:hover,
button.btn:hover {
  background: var(--primary-dark);
  color: var(--primary-contrast);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 111, 164, 0.22);
}

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

.btn:focus-visible,
button.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--primary) 28%, transparent);
  outline-offset: 2px;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary-border);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: none;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.link,
.footer-link {
  color: var(--primary);
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.16s ease;
}

.link:hover,
.footer-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  padding: 1rem;
  border-radius: var(--radius);
}

.media-frame {
  overflow: hidden;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.media-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.video-frame {
  aspect-ratio: 16 / 9;
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.text-truncate {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: top;
  width: 100%;
  min-width: 0;
}

.target-url {
  padding: 0.35rem 0.5rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-family: Consolas, 'SFMono-Regular', Menlo, Monaco, monospace;
  font-size: 0.92rem;
  user-select: all;
}

.target-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.target-action-button {
  align-items: stretch;
  flex-direction: column;
  gap: 0.18rem;
  width: 100%;
  overflow: hidden;
  justify-content: center;
  min-width: 0;
  text-align: center;
}

.target-action-button:hover {
  color: var(--primary-contrast);
}

.target-action-label {
  display: block;
}

.target-action-url {
  min-width: 0;
  color: color-mix(in oklab, var(--primary-contrast) 76%, transparent);
  font-family: Consolas, 'SFMono-Regular', Menlo, Monaco, monospace;
  font-size: 0.82rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.copy-button:hover {
  color: var(--primary-dark);
  border-color: color-mix(in oklab, var(--primary) 35%, var(--primary-border));
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0 2rem;
}

.footer-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 760px);
    padding: 28px 0 24px;
  }

  .page-header {
    align-items: flex-start;
  }

  .header-copy h1 {
    font-size: 1.22rem;
  }

  .utility-brand-title {
    font-size: 1.22rem;
  }

  .panel-body {
    padding: 18px;
  }

  .copy-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
