/* The frame every widget tool page shares: public/widgets/<id>/index.html, written by
   scripts/widget-pages-from-spec.mjs. A tool styles its own drawing in its tool.css; this file
   only gives the page its black field, brand line and footer, and hides both inside an embed. */
:root {
  --w-bg: #000;
  --w-panel: #050807;
  --w-line: rgba(0, 255, 136, 0.22);
  --w-green: #00ff88;
  --w-gold: #ffd700;
  --w-red: #ff4d6d;
  --w-text: #e8fff7;
  --w-muted: #adc9c0;
  --w-subtle: #8fa9a0;
  --w-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--w-bg);
  color: var(--w-text);
  font: 15px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
}

a { color: var(--w-green); }

.t27-widget-head,
.t27-widget-main,
.t27-widget-foot {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding-inline: clamp(12px, 3vw, 28px);
}

.t27-widget-head { padding-block: 18px 10px; }

.t27-widget-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--w-green);
  font: 600 0.72rem var(--w-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  min-height: 32px;
}

.t27-widget-head h1 {
  margin: 10px 0 6px;
  font: 800 clamp(1.3rem, 3.4vw, 2rem)/1.2 var(--w-mono);
  color: #fff;
}

.t27-widget-head p {
  max-width: 72ch;
  margin: 0;
  color: var(--w-muted);
}

.t27-widget-main { padding-block: 10px 18px; min-height: 320px; }

.t27-widget-foot {
  padding-block: 14px 28px;
  border-top: 1px solid var(--w-line);
  color: var(--w-subtle);
  font-size: 0.8rem;
}

.t27-widget-foot summary { cursor: pointer; color: var(--w-muted); min-height: 32px; display: flex; align-items: center; }
/* Every link in the frame is a 32px target, like the tool's own buttons. */
.t27-widget-foot a { display: inline-flex; align-items: center; min-height: 32px; }
.t27-widget-foot ul { margin: 6px 0; padding-left: 18px; font-family: var(--w-mono); font-size: 0.72rem; overflow-wrap: anywhere; }
.t27-widget-noscript { padding: 1em; color: var(--w-muted); }

/* Inside somebody's iframe the tool is the whole page. */
html.embed .t27-widget-head,
html.embed .t27-widget-foot { display: none; }
html.embed .t27-widget-main { width: 100%; padding: 8px; min-height: 0; }

/* Controls the tools share, so seven tools do not draw seven kinds of button. */
.t27-btn {
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid var(--w-line);
  border-radius: 999px;
  background: transparent;
  color: var(--w-muted);
  font: 0.76rem var(--w-mono);
  cursor: pointer;
}
.t27-btn:hover, .t27-btn[aria-pressed="true"] { border-color: var(--w-green); color: var(--w-green); }

.t27-drop {
  display: grid;
  place-items: center;
  min-height: 64px;
  padding: 12px;
  border: 1px dashed var(--w-line);
  border-radius: 10px;
  color: var(--w-subtle);
  font: 0.78rem var(--w-mono);
  text-align: center;
  cursor: pointer;
}
.t27-drop.is-over { border-color: var(--w-green); color: var(--w-green); }
