/* Sihai Capital AI Workbench shared styles */
:root {
  --ink: #101613;
  --muted: #5e6963;
  --paper: #f3f1ea;
  --surface: #fff;
  --line: #d7d2c6;
  --forest: #123b31;
  --forest-2: #1f5748;
  --brass: #b08843;
  --brass-light: #e4cb93;
  --sage: #dce7df;
  --danger: #914735;
  --warn: #a06a1f;
  --ok: #2f6b4f;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body[data-lang="zh"] { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(176, 136, 67, .48); outline-offset: 2px; }
[hidden] { display: none !important; }

.topbar { border-bottom: 1px solid var(--line); background: rgba(243, 241, 234, .95); }
.nav {
  width: min(1220px, calc(100% - 40px));
  min-height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: Georgia, "Times New Roman", serif; font-weight: 700; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--brass); border-radius: 4px; background: var(--forest); color: #fffaf0;
  box-shadow: inset 0 0 0 3px var(--forest), inset 0 0 0 4px rgba(228, 203, 147, .45);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }
.back-link { padding: 8px 10px; color: #34413b; font-size: 13px; }
.language-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.language-switch button { min-width: 38px; min-height: 30px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.language-switch button[aria-pressed="true"] { background: var(--forest); color: #fff; }

.wb-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.wb-head-inner { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 28px; }
.kicker { margin-bottom: 8px; color: var(--brass); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.wb-head h1 { max-width: 860px; margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.12; letter-spacing: 0; }
.wb-head p { max-width: 780px; margin: 12px 0 0; color: var(--muted); font-size: 15px; }

.workspace { width: min(1220px, calc(100% - 40px)); margin: 0 auto; padding: 26px 0 60px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 20px; overflow: hidden;
}
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card h3 { margin: 0 0 10px; font-size: 14px; }
.card .sub { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.panel-label { color: var(--brass); font-size: 11px; font-weight: 800; margin-bottom: 6px; }

label { display: block; margin-bottom: 6px; color: #34413b; font-size: 12px; font-weight: 700; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 9px 11px; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 6px; background: #fbfaf7; color: var(--ink);
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brass); outline: 2px solid rgba(176, 136, 67, .18); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field { min-width: 0; }
.field.full { grid-column: 1 / -1; }
.hint { display: block; margin: -6px 0 10px; color: var(--muted); font-size: 11px; }

.btn {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-weight: 750; font-size: 13px;
}
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-2); }
.btn-outline { border-color: var(--line); background: #fff; color: var(--forest); }
.btn-outline:hover { border-color: var(--brass); }
.btn-small { min-height: 32px; padding: 0 11px; font-size: 12px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { cursor: wait; opacity: .6; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.status { color: var(--muted); font-size: 12px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.badge-high { background: #f3d9d2; color: var(--danger); }
.badge-medium { background: #f1e3c4; color: var(--warn); }
.badge-low { background: var(--sage); color: var(--ok); }
.badge-gray { background: #e7e3d8; color: var(--muted); }
.badge-ok { background: var(--sage); color: var(--ok); }
.badge-warn { background: #f1e3c4; color: var(--warn); }

.list { margin: 0; padding: 0; list-style: none; }
.list li { padding: 12px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-meta { color: var(--muted); font-size: 12px; }
.tag { display: inline-block; margin: 0 6px 6px 0; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: #fbfaf7; color: #34413b; font-size: 11px; }
.score-pill { display: inline-grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(176,136,67,.55); border-radius: 50%; font-family: Georgia, serif; font-weight: 700; }

.bar { height: 6px; background: #ece8dc; border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brass); }

table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 700; font-size: 11px; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs button { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 700; }
.tabs button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }

.notice { padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #fbfaf7; color: var(--muted); font-size: 12px; }
.notice strong { color: var(--ink); }

@media (max-width: 980px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .nav, .wb-head-inner, .workspace { width: min(100% - 28px, 1220px); }
  .back-link { display: none; }
}
