/* AstrLink Guard: what the local model adds to the built-in rules. */

/* The ship is as tall as the box the crew gets; the copy keeps clear of it. */
.guard-hero { --hero-copy: 500px; }
.guard-hero:lang(en) { --hero-copy: 530px; }
.guard-hero .hero-copy { position: relative; z-index: 3; padding-top: 170px; padding-bottom: calc(clamp(200px, 22.92vw, 330px) + 56px); }
@media (min-width: 901px) {
  .guard-hero .hero-copy { padding-bottom: 32px; }
}
.guard-hero h1 { margin-top: 0; font-size: clamp(42px, 3.4vw + 20px, 72px); line-height: 1.1; letter-spacing: -0.02em; }
.guard-hero .tagline { margin-top: 14px; max-width: 720px; font-size: clamp(21px, 1vw + 14px, 30px); font-weight: 600; line-height: 1.35; color: #cfe9ec; }
.guard-hero .stage { position: absolute; inset: 0; }
.guard-hero .crew { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; }
.guard-hero .meta { margin-top: 18px; font-size: 13.5px; color: #8b94a5; }

/* Beside the copy, the AstrLink star in Guard's teal, with the placeholders
   it hands out circling it: names and addresses, which only the model finds,
   close in, the kinds the rules also find further out. The box is a point at
   the centre; it sits behind the ship so a passing tag goes under the hull. */
.guard-orbit { position: absolute; z-index: 0; left: calc(50% + min(600px, 50% - 24px) - 200px); top: 326px; width: 0; height: 0; pointer-events: none; }
.guard-orbit .ring { position: absolute; left: 0; top: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.guard-orbit .r1 { width: 200px; height: 200px; border: 1px solid rgba(32, 187, 199, 0.24); }
.guard-orbit .r2 { width: 320px; height: 320px; border: 1px dashed rgba(255, 255, 255, 0.09); }
.guard-orbit .astr-star { left: 0; top: 0; width: 84px; height: 84px; margin: -42px 0 0 -42px; animation: glow 5s ease-in-out infinite; }
.guard-orbit .astr-star::before { inset: -130px; background: radial-gradient(closest-side, rgba(214, 250, 252, 0.42), rgba(32, 187, 199, 0.16) 28%, rgba(32, 187, 199, 0.05) 60%, rgba(32, 187, 199, 0)); }
.guard-orbit .astr-star img { width: 62px; height: 62px; }
.guard-orbit .spin { position: absolute; left: 0; top: 0; animation: guard-spin 90s linear infinite; }
.guard-orbit .s1 { --r: 100px; }
.guard-orbit .s2 { --r: 160px; }
.guard-orbit .s2, .guard-orbit .s2 i { animation-duration: 140s; animation-direction: reverse; }
.guard-orbit .arm { position: absolute; left: 0; top: 0; transform: rotate(var(--a)) translateX(var(--r)); }
.guard-orbit .s1 .arm:nth-child(1) { --a: 215deg; }
.guard-orbit .s1 .arm:nth-child(2) { --a: 35deg; }
.guard-orbit .s2 .arm:nth-child(1) { --a: 260deg; }
.guard-orbit .s2 .arm:nth-child(2) { --a: 350deg; }
.guard-orbit .s2 .arm:nth-child(3) { --a: 80deg; }
.guard-orbit .s2 .arm:nth-child(4) { --a: 170deg; }
/* Each tag turns back by its arm's angle and the ring's turn, so it stays upright. */
.guard-orbit i { position: absolute; left: 0; top: 0; padding: 3px 9px; border-radius: 7px; font: 500 12.5px/1.5 var(--mono); font-style: normal; white-space: nowrap; transform: translate(-50%, -50%) rotate(calc(-1 * var(--a))); animation: guard-unspin 90s linear infinite; }
.guard-orbit .s1 i { background: rgba(32, 187, 199, 0.2); color: #8ff0f6; box-shadow: inset 0 0 0 1px rgba(32, 187, 199, 0.4), 0 0 18px rgba(32, 187, 199, 0.22); }
.guard-orbit .s2 i { background: rgba(255, 255, 255, 0.05); color: #a3abb9; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09); }
.is-paused .guard-orbit .spin, .is-paused .guard-orbit i { animation-play-state: paused; }
@keyframes guard-spin { to { transform: rotate(360deg); } }
@keyframes guard-unspin {
  from { transform: translate(-50%, -50%) rotate(calc(-1 * var(--a))); }
  to { transform: translate(-50%, -50%) rotate(calc(-1 * var(--a) - 360deg)); }
}

/* What the model receives, with AstrLink Guard on or off. The name and the
   address turn into placeholders where they stand. */
.kinds-wrap { background: var(--bg-2); }
.guard-try { margin: 40px 0 0; max-width: 1000px; padding: 24px 28px 26px; border-radius: 18px; border: 1px solid var(--line); background: #fff; box-shadow: 0 24px 60px rgba(60, 50, 20, 0.06); }
.gt-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.gt-label { font: 12.5px var(--mono); color: #8a7a52; }
.gt-switch { display: inline-flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.gt-switch i { position: relative; width: 40px; height: 24px; border-radius: 12px; background: #c9c2b0; transition: background-color 0.25s ease; }
.gt-switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); transition: transform 0.25s ease; }
.gt-switch[aria-checked="true"] i { background: var(--teal); }
.gt-switch[aria-checked="true"] i::after { transform: translateX(16px); }
.gt-text { margin-top: 18px; font-size: clamp(17px, 0.4vw + 15px, 20px); line-height: 2; color: var(--ink); }
.gh > span { display: inline-block; line-height: 1.6; animation: gh-in 0.35s ease-out; }
.gh .raw { padding: 1px 7px; border-radius: 6px; background: #fde8eb; color: #c2364f; box-shadow: inset 0 -2px #e5485f; }
.gh.is-off .stand, .gh:not(.is-off) .raw { display: none; }
@keyframes gh-in { from { opacity: 0; transform: translateY(5px); } }
.gt-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--teal-ink); }
.gt-note.is-off { color: #c2364f; }
.coverage { margin-top: 22px; font-size: 15px; }
.coverage a { margin-left: 6px; font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--yellow); }

/* On your computer: the cable comes out, and the screen keeps checking. The
   computer is a warm pixel monitor standing on the paper. */
.local-grid { display: grid; grid-template-columns: 540px 1fr; gap: 80px; align-items: center; }
.offline { position: relative; margin: 0; padding-bottom: 64px; }
.offline .screen { position: relative; z-index: 1; border: 12px solid #e6dfcf; border-bottom-width: 18px; border-radius: 6px; background: #121925; box-shadow: inset 0 0 0 2px #d3cab5, 0 24px 50px rgba(60, 50, 20, 0.14); }
.offline .bar { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; background: #131a24; font: 12px var(--mono); color: #8b94a5; }
.offline .net { display: inline-flex; align-items: center; gap: 8px; }
.offline .net i { width: 8px; height: 8px; background: #7fe0b4; }
.offline [data-net="off"] { display: none; }
.offline.is-offline .net i { background: #ff6b80; }
.offline.is-offline [data-net="on"] { display: none; }
.offline.is-offline [data-net="off"] { display: inline; color: #ff9aa8; }
.offline .scan { margin: 0; padding: 22px 22px 26px; min-height: 6.6em; font-size: 15.5px; line-height: 2; color: #dfe3ea; }
.offline .scan .hit { display: inline-block; line-height: 1.6; padding: 0 6px; border-radius: 5px; font-family: var(--mono); font-size: 0.9em; background: rgba(32, 187, 199, 0.16); color: #6fe3ec; }
.offline .scan .hit.is-raw { background: none; padding: 0; font-family: inherit; font-size: 1em; color: #dfe3ea; }
.offline .scan .hit.is-found { background: rgba(255, 120, 140, 0.16); color: #ff9aa8; padding: 0 6px; }
.offline .base { position: relative; z-index: 1; width: 36%; height: 26px; margin: 0 auto; background: #d9d1bf; box-shadow: 0 14px 0 -4px #e6dfcf, 0 26px 24px -10px rgba(60, 50, 20, 0.18); }
.offline .cord { position: absolute; left: 50%; right: 0; bottom: 18px; height: 40px; }
.offline .wire { position: absolute; left: 0; top: 0; width: 24px; height: 26px; border-left: 6px solid #b9b09b; border-bottom: 6px solid #b9b09b; }
.offline .wire::after { content: ""; position: absolute; left: 18px; bottom: -6px; width: 150px; height: 6px; background: #b9b09b; }
.offline .plug { position: absolute; left: 192px; top: 12px; width: 34px; height: 22px; background: #8f8673; box-shadow: 8px 4px 0 -4px #646d84; transition: transform 0.6s steps(4); }
.offline .socket { position: absolute; left: 240px; top: 2px; width: 30px; height: 40px; background: #18203a; border: 4px solid #e6dfcf; box-shadow: 0 0 0 2px #d3cab5; }
.offline.is-offline .plug { transform: translate(-34px, 10px) rotate(-14deg); }
.local-list { margin-top: 28px; gap: 18px; }
.spec { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--muted); }
.spec b { color: var(--ink); font-weight: 600; }
.spec a { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--yellow); }

.setup { background: var(--bg-2); }
.setup .steps { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.setup .step { padding-top: 22px; border-top: 2px solid var(--rule); }
.setup .num { display: inline-block; padding: 1px 9px; background: var(--yellow); color: #1b2030; font: 700 13px var(--mono); }
.setup h3 { margin-top: 16px; font-size: 20px; }
.setup .step p { margin-top: 8px; font-size: 15px; }
.setup .note { margin-top: 36px; display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink); }
.setup .note::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--teal); }

.bounds { margin-top: 40px; grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1180px) {
  .guard-hero .lead { max-width: 500px; }
  .guard-orbit { left: calc(50% + min(600px, 50% - 24px) - 170px); transform: scale(0.84); }
  .local-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
}
@media (max-width: 900px) {
  .guard-orbit { display: none; }
  .guard-hero .hero-copy { padding-top: 120px; }
  .local-grid { grid-template-columns: 1fr; }
  .offline { max-width: 540px; }
  .setup .steps { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .guard-hero .hero-copy { padding-top: 104px; }
  .guard-try { padding: 18px 18px 20px; }
  .gt-head { flex-wrap: wrap; gap: 10px; }
  .offline .scan { padding: 18px; font-size: 15px; }
  .offline .cord { left: 40%; }
  .offline .wire::after { width: 90px; }
  .offline .plug { left: 132px; }
  .offline .socket { left: 176px; }
}
@media (prefers-reduced-motion: reduce) {
  .gt-switch i, .gt-switch i::after, .offline .plug { transition: none; }
  .gh > span, .guard-orbit .astr-star, .guard-orbit .spin, .guard-orbit i { animation: none; }
}
