:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #172e29;
  background: #f3f6f1;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid #146e54; outline-offset: 4px; }

.shell { min-height: 100dvh; }
.top {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 5vw, 4rem);
  background: #fcfdfb;
  border-bottom: 1px solid #dce5dc;
}

.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; text-decoration: none; }
.mark { position: relative; display: block; flex: none; width: 34px; height: 34px; background: #154839; border-radius: 9px; }
.mark i { position: absolute; width: 13px; height: 10px; border: 1.5px solid #f4ffe9; border-radius: 2px; }
.mark i:first-child { top: 9px; left: 9px; }
.mark i:last-child { top: 14px; left: 13px; background: #154839; }
.back, .external { font-size: 0.875rem; font-weight: 650; text-underline-offset: 4px; }
.back, .demo-link { color: #165b45; }

.entry { width: min(100% - 2rem, 640px); margin: 0 auto; padding: clamp(3.5rem, 13vh, 9rem) 0 3rem; }
.entry-heading { margin: 0 0 28px; }
.entry h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.35rem); letter-spacing: -0.05em; line-height: 1.18; }
.entry-heading p { margin: 14px 0 0; color: #455a50; line-height: 1.65; }

.card {
  padding: clamp(1.25rem, 5vw, 2rem);
  border-radius: 19px;
  border: 1px solid #d9e4db;
  background: #fcfdfb;
  box-shadow: 0 16px 42px rgb(30 62 42 / 7%);
}

label { display: block; margin-bottom: 9px; font-size: 0.9rem; font-weight: 700; }
.controls { display: flex; gap: 10px; }
input { flex: 1; min-width: 0; padding: 0 14px; min-height: 48px; border: 1px solid #bacbc0; border-radius: 9px; background: white; color: #172e29; }
input::placeholder { color: #596a61; }
button { min-height: 48px; padding: 0 16px; border: 0; border-radius: 9px; background: #154839; color: #fff; font-weight: 700; cursor: pointer; }
button:hover { background: #20664e; }
button span, .demo-link span, .external span { margin-left: 4px; }
.demo-link { display: inline-block; margin-top: 20px; font-size: 0.9rem; font-weight: 700; text-underline-offset: 4px; }
.status { margin: 13px 0 0; font-size: 0.9rem; }
.error { color: #a02422; }

.viewer { display: flex; flex-direction: column; min-height: calc(100dvh - 68px); }
.viewer-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px clamp(1rem, 5vw, 4rem); background: #154839; color: #fff; }
.viewer-label { min-width: 0; }
.viewer-label h1 { margin: 0; font-size: 1rem; }
.viewer-label p { margin: 4px 0 0; font-size: 0.8rem; color: #d1e8dc; overflow-wrap: anywhere; }
.external { flex: none; }
iframe { display: block; flex: 1; width: 100%; min-height: 360px; border: 0; background: #f3f6f1; }

@media (max-width: 380px) {
  .controls { flex-direction: column; }
}

[hidden] { display: none !important; }
.examples { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
