/* YU-ZORA TOOL LAB
   Separate visual system for /tools/. Keep the shared header/footer structure,
   but use a darker, mobile-first utility-lab surface distinct from GAMES/BUSINESS. */

body.tools-page {
  --bg: #0b111c;
  --surface: #101927;
  --surface-2: #152235;
  --paper: #dbe5f0;
  --paper-bright: #f6f9fc;
  --muted: #91a1b4;
  --line: #24344a;
  --line-soft: #1b2a3d;
  --accent: #70d7c6;
  --accent-strong: #9ce9dc;
  --accent-soft: rgba(112, 215, 198, .12);
  --tools-violet: #9c95ff;
  --tools-blue: #78b8ff;
  --tools-warning: #efbd74;
  --shadow: 0 24px 80px rgba(0, 0, 0, .28);
  background:
    radial-gradient(circle at 82% 7%, rgba(112, 184, 255, .12), transparent 31rem),
    radial-gradient(circle at 12% 28%, rgba(156, 149, 255, .09), transparent 25rem),
    var(--bg);
  color: var(--paper);
}

.tools-page .site-header {
  background: rgba(11, 17, 28, .92);
  border-bottom-color: rgba(145, 161, 180, .18);
  backdrop-filter: blur(18px);
}
.tools-page .brand { color: var(--paper-bright); }
.tools-page .brand-glyph {
  background: var(--accent);
  box-shadow: 0 0 18px rgba(112, 215, 198, .45);
}
.tools-page .nav a { color: #8395aa; }
.tools-page .nav a:hover,
.tools-page .nav a.active { color: var(--paper-bright); border-color: var(--accent); }
.tools-page .site-footer {
  background: #080e17;
  border-top-color: rgba(145, 161, 180, .16);
}
.tools-page .site-footer strong { color: var(--paper-bright); }
.tools-page .footer-links a:hover { color: var(--accent-strong); }
.tools-page .archive-kicker,
.tools-page .archive-label { color: var(--accent); }

.tools-shell {
  position: relative;
  overflow: hidden;
}
.tools-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .38;
  background-image:
    linear-gradient(rgba(132, 159, 188, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(132, 159, 188, .055) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000 0, rgba(0,0,0,.48) 62%, transparent 100%);
}

.tools-hero {
  position: relative;
  padding: clamp(58px, 9vw, 116px) 0 clamp(52px, 8vw, 96px);
  border-bottom: 1px solid var(--line);
}
.tools-hero::after {
  content: "";
  position: absolute;
  width: min(76vw, 760px);
  aspect-ratio: 1;
  right: max(-36vw, -260px);
  top: max(-34vw, -330px);
  border: 1px solid rgba(112, 215, 198, .12);
  border-radius: 50%;
  box-shadow:
    0 0 0 72px rgba(120, 184, 255, .025),
    0 0 0 144px rgba(156, 149, 255, .018);
  pointer-events: none;
}
.tools-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: clamp(36px, 8vw, 116px);
  align-items: end;
}
.tools-hero-copy { position: relative; z-index: 1; }
.tools-hero h1 {
  max-width: 14ch;
  margin: 12px 0 20px;
  color: var(--paper-bright);
  font-size: clamp(42px, 7.6vw, 94px);
  line-height: .98;
  letter-spacing: -.065em;
  text-wrap: balance;
}
.tools-hero h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(100deg, var(--accent) 0%, var(--tools-blue) 48%, var(--tools-violet) 100%);
  background-clip: text;
  -webkit-background-clip: text;
}
.tools-hero-lead {
  max-width: 720px;
  margin: 0;
  color: #adbac9;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.95;
}
.tools-hero-actions,
.tool-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.tools-primary-btn,
.tools-secondary-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 820;
  text-decoration: none;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.tools-primary-btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #071512;
  box-shadow: 0 12px 30px rgba(112, 215, 198, .12);
}
.tools-primary-btn:hover { transform: translateY(-1px); background: #93e7d8; border-color: #93e7d8; }
.tools-secondary-btn {
  border: 1px solid #34465e;
  background: rgba(16, 25, 39, .72);
  color: var(--paper-bright);
}
.tools-secondary-btn:hover { transform: translateY(-1px); border-color: #536b87; background: #162235; }

.tools-lab-panel {
  position: relative;
  min-height: 260px;
  padding: 20px;
  border: 1px solid #2b3c52;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(21,34,53,.9), rgba(12,20,33,.96));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tools-lab-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(112,215,198,.15), transparent 25%),
    linear-gradient(135deg, transparent 50%, rgba(120,184,255,.04) 50%);
  pointer-events: none;
}
.tools-panel-head,
.tools-panel-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.tools-panel-head {
  padding-bottom: 16px;
  color: #768ba3;
  border-bottom: 1px solid #263850;
  font: 700 10px/1 var(--mono);
  letter-spacing: .12em;
}
.tools-panel-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-strong); }
.tools-panel-indicator::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(112,215,198,.7);
}
.tools-panel-body { position: relative; display: grid; gap: 0; margin-top: 18px; }
.tools-panel-row { padding: 14px 0; border-bottom: 1px solid #203148; }
.tools-panel-row:last-child { border-bottom: 0; }
.tools-panel-row span { color: #70849c; font: 700 10px/1.2 var(--mono); letter-spacing: .08em; }
.tools-panel-row strong { color: #e7eef7; font-size: 13px; text-align: right; }

.tools-section { padding: clamp(54px, 8vw, 98px) 0; border-bottom: 1px solid var(--line); }
.tools-section--raised { background: rgba(16, 25, 39, .62); }
.tools-section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}
.tools-section-head h2 {
  margin: 7px 0 0;
  color: var(--paper-bright);
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: -.045em;
}
.tools-section-head > p:last-child,
.tools-section-note { max-width: 520px; margin: 0; color: var(--muted); font-size: 13px; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 14px;
}
.tool-card {
  position: relative;
  min-height: 360px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid #2b3c52;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(19,30,47,.96), rgba(12,20,32,.96));
  box-shadow: 0 16px 48px rgba(0,0,0,.17);
  transition: transform .18s ease, border-color .18s ease;
}
.tool-card:hover { transform: translateY(-2px); border-color: #45617f; }
.tool-card-hitarea { position: absolute; inset: 0; z-index: 1; }
.tool-card > *:not(.tool-card-hitarea) { position: relative; }
.tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid #22344a;
  color: #71869f;
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
}
.tool-card-head strong { color: var(--accent-strong); }
.tool-card-body { padding: clamp(24px, 5vw, 42px); }
.tool-card-kicker { margin: 0 0 12px; color: #879aaf; font: 700 10px/1.4 var(--mono); letter-spacing: .1em; }
.tool-card h3 {
  margin: 0;
  color: var(--paper-bright);
  font-size: clamp(28px, 4.5vw, 46px);
  letter-spacing: -.045em;
}
.tool-card-summary { margin: 11px 0 0; color: var(--accent-strong); font-size: 16px; font-weight: 760; }
.tool-card-copy { max-width: 720px; margin: 16px 0 0; color: #9cacbe; font-size: 13px; }
.tool-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-top: 1px solid #22344a;
}
.tool-card-tags,
.tool-tag-row { display: flex; gap: 7px; flex-wrap: wrap; }
.tool-tag {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 8px;
  border: 1px solid #31455f;
  border-radius: 999px;
  color: #a5b6c8;
  background: rgba(10,17,28,.52);
  font: 700 9px/1 var(--mono);
  letter-spacing: .07em;
}
.tool-card-link { color: var(--accent-strong); font-size: 12px; font-weight: 820; white-space: nowrap; }

.tools-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #0e1724;
}
.tools-principle { min-width: 0; padding: clamp(24px, 4vw, 38px); border-right: 1px solid var(--line); }
.tools-principle:last-child { border-right: 0; }
.tools-principle > span { color: var(--accent); font: 800 10px/1 var(--mono); letter-spacing: .11em; }
.tools-principle h3 { margin: 12px 0 9px; color: var(--paper-bright); font-size: 19px; line-height: 1.45; }
.tools-principle p { margin: 0; color: var(--muted); font-size: 13px; }

/* Tool detail */
.tool-detail-main { min-height: 70vh; }
.tool-breadcrumb {
  padding: 18px 0 0;
  color: #6f849c;
  font-size: 11px;
}
.tool-breadcrumb a { color: #8ca2ba; text-decoration: none; }
.tool-breadcrumb a:hover { color: var(--accent-strong); }
.tool-detail-hero { padding: clamp(34px, 6vw, 78px) 0 clamp(52px, 8vw, 90px); border-bottom: 1px solid var(--line); }
.tool-detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: clamp(34px, 7vw, 92px);
  align-items: start;
}
.tool-detail-title {
  margin: 12px 0 9px;
  color: var(--paper-bright);
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1;
  letter-spacing: -.06em;
}
.tool-detail-summary { margin: 0; color: var(--accent-strong); font-size: clamp(18px, 2.5vw, 25px); font-weight: 800; }
.tool-detail-lead { max-width: 790px; margin: 22px 0 0; color: #a3b2c3; line-height: 1.95; }
.tool-hero-meta { margin-top: 20px; }
.tool-action-meta { width: 100%; margin: 8px 0 0; color: #75899f; font: 650 10px/1.5 var(--mono); }

.tool-status-card {
  overflow: hidden;
  border: 1px solid #31455d;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(21,34,53,.96), rgba(9,16,27,.98));
  box-shadow: var(--shadow);
}
.tool-status-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 15px 17px;
  border-bottom: 1px solid #263950;
  color: #71859d;
  font: 700 10px/1 var(--mono);
  letter-spacing: .08em;
}
.tool-release-state { display: inline-flex; align-items: center; gap: 7px; color: var(--tools-warning); }
.tool-release-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.tool-status-list { margin: 0; }
.tool-status-list div { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 14px 17px; border-bottom: 1px solid #203148; }
.tool-status-list div:last-child { border-bottom: 0; }
.tool-status-list dt { color: #70849b; font: 700 10px/1.6 var(--mono); letter-spacing: .06em; }
.tool-status-list dd { margin: 0; color: #e4edf6; font-size: 12px; font-weight: 760; text-align: right; }
.tool-release-note { margin: 0; padding: 17px; border-top: 1px solid #2c3d53; background: rgba(239,189,116,.06); color: #b9a785; font-size: 11px; line-height: 1.8; }

.tool-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool-feature {
  padding: clamp(23px, 4vw, 36px);
  border: 1px solid #293b51;
  border-radius: 12px;
  background: rgba(15,24,38,.72);
}
.tool-feature span { color: var(--tools-blue); font: 800 10px/1 var(--mono); letter-spacing: .1em; }
.tool-feature h3 { margin: 12px 0 9px; color: var(--paper-bright); font-size: 19px; }
.tool-feature p { margin: 0; color: var(--muted); font-size: 13px; }

.tool-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tool-step { min-width: 0; padding: clamp(22px, 3.5vw, 34px); border-right: 1px solid var(--line); background: #0d1623; }
.tool-step:last-child { border-right: 0; }
.tool-step-no { color: var(--accent); font: 850 23px/1 var(--mono); }
.tool-step h3 { margin: 20px 0 8px; color: var(--paper-bright); font-size: 17px; }
.tool-step p { margin: 0; color: var(--muted); font-size: 12.5px; }

.tool-trust-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); gap: 18px; align-items: start; }
.tool-trust-panel,
.tool-proof-panel { border: 1px solid #2a3d54; border-radius: 14px; background: rgba(14,23,36,.82); }
.tool-trust-panel { padding: clamp(24px, 4vw, 38px); }
.tool-trust-panel h3,
.tool-proof-panel h3 { margin: 0; color: var(--paper-bright); font-size: 21px; }
.tool-safety-list { display: grid; gap: 0; margin: 20px 0 0; padding: 0; list-style: none; }
.tool-safety-list li { position: relative; padding: 12px 0 12px 28px; border-bottom: 1px solid #203149; color: #a8b7c7; font-size: 13px; }
.tool-safety-list li:last-child { border-bottom: 0; }
.tool-safety-list li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 900; }
.tool-proof-panel { overflow: hidden; }
.tool-proof-panel h3 { padding: 24px 24px 12px; }
.tool-proof-copy { margin: 0; padding: 0 24px 20px; color: var(--muted); font-size: 12px; }
.tool-proof-links { display: grid; border-top: 1px solid #24374d; }
.tool-proof-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px 18px;
  border-bottom: 1px solid #203148;
  color: #c2cfdb;
  text-decoration: none;
}
.tool-proof-link:last-child { border-bottom: 0; }
.tool-proof-link:hover { background: #132034; color: var(--paper-bright); }
.tool-proof-link span { display: block; color: #73889f; font: 700 9px/1.4 var(--mono); letter-spacing: .07em; }
.tool-proof-link strong { display: block; margin-top: 4px; font-size: 12px; }
.tool-proof-link::after { content: "↗"; color: var(--accent); font-size: 14px; }

.tool-note-stack { display: grid; gap: 10px; }
.tool-note {
  margin: 0;
  padding: 15px 17px;
  border-left: 2px solid #3d5875;
  background: rgba(17,28,44,.78);
  color: #94a6b8;
  font-size: 12px;
}

.tool-download-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 5vw, 50px);
  border: 1px solid #35506c;
  border-radius: 16px;
  background:
    radial-gradient(circle at 90% 10%, rgba(112,215,198,.13), transparent 18rem),
    linear-gradient(145deg, #142238, #0d1725);
}
.tool-download-panel h2 { margin: 7px 0 10px; color: var(--paper-bright); font-size: clamp(28px, 4.5vw, 45px); letter-spacing: -.045em; }
.tool-download-panel p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; }
.tool-download-actions { display: grid; gap: 8px; min-width: min(100%, 270px); }
.tool-download-actions .tools-primary-btn,
.tool-download-actions .tools-secondary-btn { width: 100%; }
.tool-download-fineprint { color: #70869c !important; font: 650 9px/1.6 var(--mono) !important; text-align: center; }

@media (max-width: 980px) {
  .tools-hero-grid,
  .tool-detail-hero-grid,
  .tool-trust-layout { grid-template-columns: 1fr; }
  .tools-lab-panel { max-width: 720px; }
  .tools-principles,
  .tool-feature-grid { grid-template-columns: 1fr; }
  .tools-principle { border-right: 0; border-bottom: 1px solid var(--line); }
  .tools-principle:last-child { border-bottom: 0; }
  .tool-steps { grid-template-columns: 1fr 1fr; }
  .tool-step:nth-child(2) { border-right: 0; }
  .tool-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .tools-page .header-inner { align-items: center; }
  .tools-page .nav { max-width: 66%; }
  .tools-hero { padding-top: 48px; }
  .tools-hero h1 { max-width: 10ch; font-size: clamp(46px, 15vw, 68px); }
  .tools-hero-actions,
  .tool-hero-actions { display: grid; grid-template-columns: 1fr; }
  .tools-primary-btn,
  .tools-secondary-btn { width: 100%; min-height: 52px; }
  .tools-section-head { display: block; }
  .tools-section-head > p:last-child { margin-top: 12px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 0; }
  .tool-card-footer { align-items: flex-start; flex-direction: column; }
  .tool-card-link { align-self: flex-end; }
  .tool-detail-title { font-size: clamp(44px, 13vw, 62px); }
  .tool-detail-summary { font-size: 19px; }
  .tool-status-card { margin-top: 4px; }
  .tool-download-panel { grid-template-columns: 1fr; }
  .tool-download-actions { width: 100%; min-width: 0; }
}

@media (max-width: 520px) {
  .tools-page .header-inner { align-items: flex-start; }
  .tools-page .nav { max-width: 68%; }
  .tools-hero::after { width: 110vw; right: -62vw; top: -34vw; }
  .tools-lab-panel { padding: 16px; min-height: 240px; }
  .tools-panel-row { align-items: flex-start; }
  .tools-panel-row strong { max-width: 58%; }
  .tool-steps { grid-template-columns: 1fr; }
  .tool-step,
  .tool-step:nth-child(2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .tool-step:last-child { border-bottom: 0; }
  .tool-status-list div { grid-template-columns: 1fr; gap: 4px; }
  .tool-status-list dd { text-align: left; }
  .tool-feature { padding: 24px 20px; }
  .tool-proof-link { min-height: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card,
  .tools-primary-btn,
  .tools-secondary-btn { transition: none; }
}
