:root {
  --bg: #f3f0ea;
  --bg-soft: #ebe6dc;
  --surface: #ffffff;
  --surface-2: #f8f6f2;
  --ink: #1a2332;
  --ink-2: #3d4a5c;
  --ink-3: #6b7789;
  --line: #e2ddd3;
  --line-strong: #cfc8bb;
  --accent: #0f6e6e;
  --accent-2: #0a4f56;
  --accent-soft: #e6f3f3;
  --accent-mid: #1a8a8a;
  --ok: #1f7a4d;
  --ok-soft: #e8f6ee;
  --warn: #9a6b12;
  --warn-soft: #fbf3e0;
  --danger: #b42318;
  --danger-soft: #fdeceb;
  --shadow: 0 1px 2px rgba(26, 35, 50, 0.04), 0 8px 24px rgba(26, 35, 50, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 268px;
  --max: 1540px;
  --font: "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --zk-stripe: repeating-linear-gradient(-45deg, #FFD400 0 14px, #ffffff 14px 28px);
}

* { box-sizing: border-box; }
html { lang: zh-CN; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--zk-stripe);
}
body { font-size: 14px; line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

.app-shell {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100vh;
  padding: 20px 24px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent-mid), var(--accent-2));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.brand h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.brand p {
  margin: 2px 0 0;
  color: var(--ink-3);
  font-size: 12px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.url-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(520px, 46vw);
  padding: 7px 8px 7px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.url-chip code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--ink-2);
}
.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  object-fit: cover;
  background: #d2d2d7;
  color: #1d1d1f;
}
.user-avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.user-avatar-md { width: 36px; height: 36px; font-size: 14px; }
.user-avatar-lg { width: 72px; height: 72px; font-size: 28px; }
img.user-avatar { display: inline-block; }

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.session-name {
  white-space: nowrap;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.avatar-editor {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.avatar-editor .stack { gap: 8px; }
.avatar-editor input[type="file"] { display: none; }

.session-pill.guest {
  background: var(--bg-soft);
  color: var(--ink-3);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.layout.no-side {
  grid-template-columns: 1fr;
}

.sidebar {
  position: sticky;
  top: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.side-label {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: none;
  padding: 4px 8px 10px;
}
.menu-block { margin-bottom: 6px; }
.menu-top {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--ink);
}
.menu-top:hover { border-color: var(--line-strong); }
.menu-sub {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px 12px 8px 18px;
  color: var(--ink-2);
  margin-top: 2px;
}
.menu-sub:hover { background: var(--bg-soft); }
.menu-sub.active {
  background: var(--accent-soft);
  color: var(--accent-2);
  font-weight: 600;
}
.side-collapse {
  display: none;
  width: 100%;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 12px;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-head h2 { margin: 0; }

.muted { color: var(--ink-3); }
.tiny { font-size: 12px; }
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.row-spread {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stack { display: flex; flex-direction: column; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 110, 110, 0.12);
}
.field textarea { min-height: 88px; resize: vertical; }
.help {
  font-size: 12px;
  color: var(--ink-3);
}

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 600;
  transition: 0.15s ease;
}
.btn:hover { background: var(--surface-2); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-mid), var(--accent));
  border-color: var(--accent-2);
  color: #fff;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-danger {
  background: var(--danger-soft);
  border-color: #f0b4ae;
  color: var(--danger);
}
.btn-ghost {
  background: transparent;
}
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: var(--accent-2); }
.badge-muted { background: var(--bg-soft); color: var(--ink-3); }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: #fff;
}
th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 12px;
  color: var(--ink-3);
  background: var(--surface-2);
  font-weight: 700;
}
tr:last-child td { border-bottom: none; }

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.tab {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 9px;
  color: var(--ink-2);
  font-weight: 600;
}
.tab.active {
  background: #fff;
  color: var(--accent-2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.hub-card {
  display: block;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #fff 0%, #f4faf9 100%);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  min-height: 150px;
}
.hub-card:hover {
  border-color: var(--accent-mid);
  text-decoration: none;
  transform: translateY(-1px);
}
.hub-card h2 { margin: 0 0 8px; font-size: 18px; }
.hub-card p { margin: 0; color: var(--ink-3); }
.hub-kicker {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.funnel {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}
.funnel-step {
  background: var(--accent-soft);
  border: 1px solid #cfe5e5;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.funnel-step strong { font-size: 13px; color: var(--accent-2); }
.funnel-step span { font-size: 11px; color: var(--ink-3); }
.funnel-step.decision {
  background: var(--warn-soft);
  border-color: #efd7a4;
}
.funnel-step.terminal {
  background: var(--ok-soft);
  border-color: #b9e0c8;
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.lane {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  min-height: 160px;
}
.lane-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.props {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px 12px;
}
.props .k { color: var(--ink-3); font-size: 12px; }
.props .v { font-weight: 600; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
}
.check input { margin-top: 3px; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: 360px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s ease;
}
.toast.show { opacity: 1; transform: none; }

.empty {
  color: var(--ink-3);
  padding: 18px 4px;
}

.gate {
  max-width: 560px;
  margin: 40px auto;
}

.mobile-only { display: none; }

@media (max-width: 1100px) {
  .funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .app-shell { padding: 12px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    max-height: none;
  }
  .sidebar.collapsed .menu-block { display: none; }
  .side-collapse { display: block; }
  .hub-grid, .grid-2, .grid-3, .lane-grid { grid-template-columns: 1fr; }
  .url-chip { max-width: 100%; }
  .topbar { flex-direction: column; align-items: stretch; }
  .mobile-only { display: initial; }
}

/* —— Unified brand / site nav (黄蓝白，轻量化) —— */
:root {
  --zk-yellow: #FFD400;
  --zk-blue: #0D54A2;
  --zk-stripe: repeating-linear-gradient(-45deg, #FFD400 0 14px, #ffffff 14px 28px);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 3px;
  background: #F3F0EA;
  border-radius: 999px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover {
  background: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--zk-yellow);
  border-color: transparent;
  color: var(--zk-blue);
  box-shadow: none;
}

.brand-stripe-bar,
.ops-bottom-stripe {
  display: none;
}

.hub-grid.hub-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.hub-grid.hub-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.hub-card.hub-ops {
  background: linear-gradient(160deg, #fff 0%, #FFF8D0 100%);
  border-width: 1px;
  border-color: var(--line);
}
.hub-card.hub-ops .hub-kicker { color: #0D54A2; }

.logo-slot-wb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand-logo-wb {
  display: block;
  height: 36px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 1100px) {
  .hub-grid.hub-4, .hub-grid.hub-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hub-grid.hub-4, .hub-grid.hub-5 { grid-template-columns: 1fr; }
}

/* Shared Apple visual language for home (#/) and inner pages (.apple-app). */
:root {
  --ah-bg: #f5f5f7;
  --ah-ink: #1d1d1f;
  --ah-muted: #6e6e73;
  --ah-blue: #0071e3;
  --ah-blue-hover: #0077ed;
  --ah-card: #ffffff;
  --ah-dark: #1d1d1f;
  --ah-line: rgba(0, 0, 0, 0.08);
  --ah-topbar: rgba(251, 251, 253, 0.82);
  --ah-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  --ah-radius: 22px;
  --ah-radius-sm: 16px;
}

body:has(.apple-home),
body:has(.apple-app),
#app:has(.apple-home),
#app:has(.apple-app) {
  background: #f5f5f7;
}

.apple-home,
.apple-app {
  --ah-bg: #f5f5f7;
  --ah-ink: #1d1d1f;
  --ah-muted: #6e6e73;
  --ah-blue: #0071e3;
  --ah-blue-hover: #0077ed;
  --ah-card: #ffffff;
  --ah-dark: #1d1d1f;
  --ah-line: rgba(0, 0, 0, 0.08);
  background: var(--ah-bg);
  color: var(--ah-ink);
  font-family: var(--ah-font);
  letter-spacing: -0.01em;
}
.apple-home {
  max-width: none;
  margin: 0;
  min-height: 100vh;
  padding: 0 0 96px;
}
.apple-app.app-shell,
.apple-app.ops-screen,
.apple-app.pl-shell {
  max-width: none;
  margin: 0;
  min-height: 100vh;
  padding: 0 0 64px;
}

.apple-home .brand-stripe-bar,
.apple-app .brand-stripe-bar { display: none; }

.apple-home .topbar,
.apple-app .topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0;
  padding: 0 28px;
  min-height: 52px;
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 0;
  border-bottom: 1px solid var(--ah-line);
  border-radius: 0;
  box-shadow: none;
}
.apple-home .brand > div:not(.logo-slot-wb),
.apple-app .brand > div:not(.logo-slot-wb) { display: none; }
.apple-home .brand-logo-wb,
.apple-app .brand-logo-wb {
  height: 28px;
  max-width: 96px;
}
.apple-home .site-nav,
.apple-app .site-nav {
  background: transparent;
  padding: 0;
  gap: 2px;
}
.apple-home .site-nav a,
.apple-app .site-nav a {
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ah-ink);
  border-radius: 0;
  opacity: 0.88;
}
.apple-home .site-nav a:hover,
.apple-app .site-nav a:hover {
  background: transparent;
  opacity: 1;
}
.apple-home .site-nav a.active,
.apple-app .site-nav a.active {
  background: transparent;
  color: var(--ah-ink);
  font-weight: 600;
  opacity: 1;
  box-shadow: none;
}
.apple-home .url-chip,
.apple-app .url-chip { display: none; }
.apple-home .session-pill,
.apple-app .session-pill {
  background: transparent;
  color: var(--ah-ink);
  font-weight: 400;
  padding: 2px 2px 2px 2px;
  gap: 8px;
}
.apple-home a.session-pill:hover,
.apple-app a.session-pill:hover {
  text-decoration: none;
  opacity: 0.82;
}
.apple-home .session-pill.guest,
.apple-app .session-pill.guest { background: transparent; }
.apple-home .topbar .btn,
.apple-app .topbar .btn {
  border: 0;
  border-radius: 980px;
  background: transparent;
  color: var(--ah-blue);
  font-weight: 400;
  padding: 6px 12px;
}
.apple-home .topbar .btn:hover,
.apple-app .topbar .btn:hover { background: transparent; text-decoration: underline; }
.apple-home .topbar .btn-primary,
.apple-app .topbar .btn-primary {
  background: var(--ah-blue);
  color: #fff;
  padding: 6px 14px;
}
.apple-home .topbar .btn-primary:hover,
.apple-app .topbar .btn-primary:hover {
  background: var(--ah-blue-hover);
  filter: none;
  text-decoration: none;
}

/* Home-only hero and tiles */
.apple-home-main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}
.apple-hero {
  text-align: center;
  padding: 92px 12px 56px;
}
.apple-eyebrow {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 600;
  color: var(--ah-muted);
  letter-spacing: 0.01em;
}
.apple-hero h2 {
  margin: 0;
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--ah-ink);
}
.apple-hero-sub {
  margin: 18px auto 0;
  max-width: 620px;
  font-size: 19px;
  line-height: 1.47;
  font-weight: 400;
  color: var(--ah-muted);
}

.apple-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.apple-tile {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 48px 40px 36px;
  border-radius: 28px;
  text-decoration: none;
  color: inherit;
  background: var(--ah-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.apple-tile:hover {
  text-decoration: none;
  transform: scale(1.01);
}
.apple-tile h3 {
  margin: 0;
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.apple-tile p {
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ah-muted);
}
.apple-more {
  margin-top: auto;
  padding-top: 28px;
  font-size: 17px;
  color: var(--ah-blue);
}
.apple-tile:hover .apple-more { text-decoration: underline; }
.apple-tile-dark {
  background: var(--ah-dark);
  color: #f5f5f7;
}
.apple-tile-dark p { color: #a1a1a6; }
.apple-tile-dark .apple-more { color: #2997ff; }

.apple-deeplinks {
  margin-top: 64px;
  text-align: center;
}
.apple-deeplinks h3 {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--ah-muted);
}
.apple-deeplink-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}
.apple-deep-btn {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--ah-blue);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
}
.apple-deep-btn:hover { text-decoration: underline; }

/* Inner-page page head, shells, and chrome */
.apple-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  width: min(1440px, calc(100% - 56px));
  margin: 0 auto;
  padding: 32px 0 16px;
}
.apple-app.ops-screen > .apple-page-head {
  width: auto;
  margin: 0;
  padding: 28px 28px 16px;
}
.apple-app[data-page="andon"] > .apple-page-head {
  padding: 18px 28px 10px;
}
.apple-page-copy h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ah-ink);
}
.apple-app[data-page="andon"] .apple-page-copy h1 {
  font-size: 28px;
}
.apple-page-sub {
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--ah-muted);
}
.apple-app[data-page="andon"] .apple-page-sub { font-size: 15px; margin-top: 4px; }
.apple-page-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--ah-muted);
  font-size: 13px;
}

.apple-app .layout {
  width: min(1440px, calc(100% - 56px));
  margin: 24px auto 0;
  gap: 22px;
}
.apple-app .layout.no-side { width: min(1440px, calc(100% - 56px)); }
.apple-app .main { gap: 18px; }

.apple-app .sidebar {
  top: 68px;
  background: var(--ah-card);
  border: 1px solid var(--ah-line);
  border-radius: var(--ah-radius);
  box-shadow: none;
  padding: 14px;
}
.apple-app .side-label { color: var(--ah-muted); letter-spacing: 0.04em; }
.apple-app .menu-top {
  border: 0;
  background: #f5f5f7;
  border-radius: 12px;
  font-weight: 600;
  color: var(--ah-ink);
}
.apple-app .menu-top:hover { background: #ececef; }
.apple-app .menu-sub { color: var(--ah-muted); border-radius: 10px; }
.apple-app .menu-sub:hover { background: #f5f5f7; color: var(--ah-ink); }
.apple-app .menu-sub.active {
  background: #f5f5f7;
  color: var(--ah-ink);
  font-weight: 600;
}
.apple-app .side-collapse {
  border: 1px solid var(--ah-line);
  background: #fff;
  border-radius: 12px;
}

.apple-app .card {
  background: var(--ah-card);
  border: 1px solid var(--ah-line);
  border-radius: var(--ah-radius);
  box-shadow: none;
  padding: 24px 26px;
}
.apple-app .card h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.apple-app .card h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.apple-app .muted { color: var(--ah-muted); }

.apple-app .field label { color: var(--ah-muted); font-weight: 500; }
.apple-app .field input,
.apple-app .field select,
.apple-app .field textarea {
  border: 1px solid var(--ah-line);
  border-radius: 12px;
  padding: 11px 13px;
  background: #fff;
}
.apple-app .field input:focus,
.apple-app .field select:focus,
.apple-app .field textarea:focus {
  border-color: var(--ah-blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.16);
}

.apple-app .main .btn,
.apple-app .card .btn,
.apple-app .gate .btn,
.apple-app .ops-body .btn,
.apple-app .ops-gate .btn-link,
.apple-app a.btn {
  appearance: none;
  border: 1px solid var(--ah-line);
  border-radius: 980px;
  background: #fff;
  color: var(--ah-ink);
  font-weight: 500;
  padding: 8px 16px;
  box-shadow: none;
}
.apple-app .main .btn:hover,
.apple-app .card .btn:hover,
.apple-app .gate .btn:hover,
.apple-app a.btn:hover {
  background: #f5f5f7;
  text-decoration: none;
  filter: none;
}
.apple-app .main .btn-primary,
.apple-app .card .btn-primary,
.apple-app .gate .btn-primary,
.apple-app .ops-gate .btn-link,
.apple-app a.btn-primary {
  background: var(--ah-blue);
  border-color: var(--ah-blue);
  color: #fff;
}
.apple-app .main .btn-primary:hover,
.apple-app .card .btn-primary:hover,
.apple-app .gate .btn-primary:hover,
.apple-app .ops-gate .btn-link:hover,
.apple-app a.btn-primary:hover {
  background: var(--ah-blue-hover);
  border-color: var(--ah-blue-hover);
  color: #fff;
  text-decoration: none;
  filter: none;
}
.apple-app .btn-danger {
  background: #f8e8e8;
  border-color: transparent;
  color: #c43e3e;
}
.apple-app .btn-sm { padding: 6px 12px; font-size: 12px; }

.apple-app .badge {
  font-weight: 500;
}
.apple-app .badge-ok { background: #e8f5ea; color: #248a3d; }
.apple-app .badge-warn { background: #f8f1e7; color: #a15c00; }
.apple-app .badge-danger { background: #f8e8e8; color: #c43e3e; }
.apple-app .badge-accent { background: #eaf3fb; color: #0071e3; }
.apple-app .badge-muted { background: #f5f5f7; color: var(--ah-muted); }

.apple-app .table-wrap {
  border: 1px solid var(--ah-line);
  border-radius: 16px;
}
.apple-app table { background: #fff; min-width: 0; }
.apple-app th {
  background: #f5f5f7;
  color: var(--ah-muted);
  font-weight: 500;
}
.apple-app th, .apple-app td { border-bottom-color: var(--ah-line); }

.apple-app .tabs {
  background: #f5f5f7;
  border: 0;
  border-radius: 980px;
  padding: 3px;
}
.apple-app .tab {
  border-radius: 980px;
  color: var(--ah-muted);
  font-weight: 500;
}
.apple-app .tab.active {
  background: #fff;
  color: var(--ah-ink);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.apple-app .funnel-step {
  background: #f5f5f7;
  border: 1px solid var(--ah-line);
  border-radius: 16px;
}
.apple-app .funnel-step strong { color: var(--ah-ink); }
.apple-app .funnel-step.decision {
  background: #f8f1e7;
  border-color: transparent;
}
.apple-app .funnel-step.terminal {
  background: #e8f5ea;
  border-color: transparent;
}
.apple-app .lane {
  background: #f5f5f7;
  border: 1px solid var(--ah-line);
  border-radius: 16px;
}
.apple-app .lane-item {
  background: #fff;
  border: 1px solid var(--ah-line);
  border-radius: 12px;
}
.apple-app .props .k { color: var(--ah-muted); }

.apple-app .gate {
  max-width: 480px;
  margin: 64px auto;
}
.apple-app .empty { color: var(--ah-muted); }
.apple-app a { color: var(--ah-blue); }
.apple-app a:hover { text-decoration: underline; }
.apple-app .site-nav a { color: var(--ah-ink); }
.apple-app .site-nav a:hover { text-decoration: none; }

.apple-app .toast {
  background: #1d1d1f;
  border-radius: 16px;
  box-shadow: none;
}

@media (max-width: 900px) {
  .apple-home .topbar,
  .apple-app .topbar {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 16px 10px;
    gap: 6px 8px;
  }
  .apple-home .brand,
  .apple-app .brand { order: 1; }
  .apple-home .topbar-actions,
  .apple-app .topbar-actions {
    display: contents;
  }
  .apple-home .session-pill,
  .apple-app .session-pill {
    order: 2;
    margin-left: auto;
  }
  .apple-home .topbar-actions > .btn,
  .apple-home .topbar-actions > a.btn,
  .apple-app .topbar-actions > .btn,
  .apple-app .topbar-actions > a.btn { order: 3; }
  .apple-home .site-nav,
  .apple-app .site-nav {
    order: 4;
    flex: 1 1 100%;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .apple-home .site-nav::-webkit-scrollbar,
  .apple-app .site-nav::-webkit-scrollbar { display: none; }
  .apple-home .site-nav a,
  .apple-app .site-nav a { white-space: nowrap; flex: 0 0 auto; }
  .apple-home-main { width: calc(100% - 32px); }
  .apple-hero { padding: 56px 8px 36px; }
  .apple-eyebrow { font-size: 17px; }
  .apple-hero h2 { font-size: clamp(36px, 12vw, 56px); }
  .apple-hero-sub { font-size: 17px; }
  .apple-tile-grid { grid-template-columns: 1fr; gap: 12px; }
  .apple-tile { min-height: 220px; padding: 36px 28px 28px; }
  .apple-tile h3 { font-size: 32px; }
  .apple-deeplinks { margin-top: 48px; }
  .apple-app .layout,
  .apple-app .layout.no-side { width: calc(100% - 32px); margin-top: 16px; }
  .apple-page-head,
  .apple-app.ops-screen > .apple-page-head,
  .apple-app[data-page="andon"] > .apple-page-head {
    width: auto;
    padding: 24px 16px 12px;
  }
  .apple-page-copy h1 { font-size: 28px; }
  .apple-page-sub { font-size: 15px; }
}

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface, #fff);
}
.profile-card .meta {
  flex: 1;
  min-width: 0;
}
.profile-card .name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.profile-card .sub {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 13px;
}
.profile-card .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.profile-card .actions input[type="file"] { display: none; }
.profile-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}
.profile-toolbar input[type="search"] {
  flex: 1;
}

/* Hide only the official deed.page corner badge. Do not match site links or iframes. */
a[data-deed-badge],
a[data-deed-report],
#deed-page-badge,
.deed-badge { display: none !important; }
