/* ==========================================================================
   EDITION 04: 钛金协议 · Ferro Protocol (html[data-edition="titan"])
   Hard-Surface Mecha / Gunmetal Industrial Sci-Fi · Chamfered Armor + Signal Amber
   ========================================================================== */

html[data-edition="titan"] {
  --bg: #0c0e12;
  --bg-elevated: #151920;
  --surface: #161a22;
  --surface-hover: #1e2430;
  --border: #282f3d;
  --border-strong: #3d475c;
  --ink: #f3f5f8;
  --ink-secondary: #9aa4b5;
  --ink-muted: #657084;
  --accent: #ff6b1a;
  --accent-soft: rgba(255, 107, 26, 0.13);
  --accent-ink: #0f0904;
  --private-color: #10b981;
  --private-soft: rgba(16, 185, 129, 0.14);
  --brand-dot: #ff6b1a;
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.65);
}

html[data-edition="titan"] .ambient-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 12% 0%, rgba(255, 107, 26, 0.09), transparent 42%),
    radial-gradient(circle at 90% 90%, rgba(16, 185, 129, 0.05), transparent 40%),
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 24px 24px;
}

html[data-edition="titan"] .app-shell {
  position: relative;
  z-index: 1;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 26px;
}

/* Industrial Tactical Top Strip */
html[data-edition="titan"] .titan-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

html[data-edition="titan"] .titan-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 140px;
  height: 2px;
  background: var(--accent);
}

html[data-edition="titan"] .titan-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

html[data-edition="titan"] .titan-title {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

html[data-edition="titan"] .titan-serial {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-left: 2px solid var(--accent);
  letter-spacing: 0.08em;
}

/* Tactical Command Console Hero */
html[data-edition="titan"] .titan-hero {
  padding: 32px 0 28px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
  align-items: end;
  border-bottom: 1px solid var(--border);
}

html[data-edition="titan"] .titan-proto-line {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

html[data-edition="titan"] .titan-proto-bar {
  display: inline-block;
  width: 36px;
  height: 6px;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent),
    var(--accent) 4px,
    transparent 4px,
    transparent 8px
  );
}

html[data-edition="titan"] .titan-greeting {
  margin: 0;
  font-size: clamp(24px, 2.7vw, 34px);
  font-weight: 750;
  line-height: 1.24;
  cursor: pointer;
}

/* Chamfered Search Armor Box */
html[data-edition="titan"] .titan-search-armor {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

html[data-edition="titan"] .titan-engines {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  margin-bottom: 10px;
}

html[data-edition="titan"] .engine-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: #101319;
  color: var(--ink-secondary);
  white-space: nowrap;
}

html[data-edition="titan"] .engine-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

html[data-edition="titan"] .titan-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #0b0d11;
  border: 1px solid var(--border);
  padding: 6px 8px 6px 12px;
}

html[data-edition="titan"] .titan-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  min-width: 0;
}

html[data-edition="titan"] .titan-search-input:focus {
  outline: none;
}

html[data-edition="titan"] .titan-exec-btn {
  padding: 7px 16px;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
}

/* High-Density 4-Column Chamfered Plates */
html[data-edition="titan"] .titan-main {
  padding-top: 26px;
}

html[data-edition="titan"] .titan-section {
  margin-bottom: 30px;
}

html[data-edition="titan"] .titan-sec-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 7px 12px;
  background: linear-gradient(90deg, rgba(255, 107, 26, 0.12) 0%, rgba(22, 26, 34, 0.4) 45%, transparent 100%);
  border-left: 3px solid var(--accent);
}

html[data-edition="titan"] .titan-sec-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
}

html[data-edition="titan"] .titan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

html[data-edition="titan"] .link-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid #353e50;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
  transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease;
}

html[data-edition="titan"] .link-card:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  border-left-color: var(--accent);
}

html[data-edition="titan"] .link-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: #0e1117;
  color: var(--accent);
  border-color: var(--border);
}

html[data-edition="titan"] .link-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-edition="titan"] .link-card-host {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-muted);
}

html[data-edition="titan"] .link-card-desc {
  margin-top: 5px;
  font-size: 12px;
  color: var(--ink-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}

@media (max-width: 1120px) {
  html[data-edition="titan"] .titan-hero {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  html[data-edition="titan"] .titan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  html[data-edition="titan"] .app-shell {
    padding: 0 16px;
  }
  html[data-edition="titan"] .titan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  html[data-edition="titan"] .titan-grid {
    grid-template-columns: 1fr;
  }
}
