:root {
  color-scheme: light;
  --ink: #202823;
  --green: #22634c;
  --green-hover: #194e3c;
  --green-soft: #e7f0e9;
  --muted: #59636a;
  --line: #e0e5e2;
  --paper: #f7f8f9;
  --surface: #ffffff;
  --sidebar: #eff2f1;
  --gold: #9a7025;
  --danger: #a23232;
  --focus: #22634c;
  --radius: 14px;
  --sidebar-width: 232px;
  --press-time: 80ms;
  --settle-time: 180ms;
  font:
    100%/1.55 -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-optical-sizing: auto;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.9375rem;
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
  touch-action: manipulation;
}
button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--settle-time),
    border-color var(--settle-time),
    transform var(--press-time);
}
button svg {
  flex: 0 0 auto;
}
button:hover {
  background: #f0f4f1;
  border-color: #b5c9bc;
}
button:active:not(:disabled) {
  transform: scale(0.98);
  background: #e5ece7;
  transition-duration: 0ms;
}
button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
button.primary:hover {
  background: var(--green-hover);
  border-color: var(--green-hover);
}
button.primary:active:not(:disabled) {
  background: #123d2d;
}
button.small {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.8125rem;
}
button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}
button[aria-busy="true"]::after {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: busy-turn 0.8s linear infinite;
}
@keyframes busy-turn {
  to {
    transform: rotate(360deg);
  }
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
#title:focus,
#app:focus {
  outline: none;
}
::selection {
  color: #133c2b;
  background: #d5e9dc;
}
:root {
  scrollbar-color: #bcc8c0 transparent;
  scrollbar-width: thin;
}
input,
textarea {
  caret-color: var(--green);
}
.skip-link {
  position: fixed;
  inset: 8px auto auto 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: none;
}
#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  padding: 24px 16px 16px;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  flex: 0 0 auto;
}
.brand {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--green);
}
.brand span {
  display: block;
  margin-top: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
}
#nav {
  display: grid;
  align-content: start;
  gap: 18px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px;
}
.nav-group-label {
  margin: 0 12px 7px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #68746c;
  letter-spacing: 0.035em;
}
.nav-group {
  display: grid;
  gap: 3px;
}
.nav-item {
  justify-content: flex-start;
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #4a5550;
  font-size: 0.875rem;
  font-weight: 500;
}
.nav-item svg {
  color: #66766c;
}
.nav-item:hover {
  background: #e3e9e5;
}
.nav-item.active {
  color: #174e36;
  background: #ddebe2;
  font-weight: 600;
}
.nav-item.active svg {
  color: #22634c;
}
.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 6px;
  font-size: 0.6875rem;
  background: #cbded1;
  color: #174e36;
  font-variant-numeric: tabular-nums;
}
.identity {
  flex: 0 0 auto;
  display: grid;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding: 16px 10px 0;
  font-size: 0.8125rem;
  color: #4e6055;
  overflow-wrap: anywhere;
}
.identity button {
  justify-content: flex-start;
  padding: 6px 10px;
  min-height: 36px;
  width: fit-content;
  font-size: 0.75rem;
  border-color: transparent;
  background: transparent;
  color: #526459;
}
#workspace-main {
  margin-left: var(--sidebar-width);
  padding: 0 clamp(24px, 3vw, 48px) 32px;
  min-width: 0;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 116px;
  padding: 25px 0 20px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(247, 248, 249, 0.92);
  backdrop-filter: blur(16px) saturate(140%);
}
.page-heading {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  gap: 12px;
}
h1 {
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  line-height: 1.22;
  letter-spacing: -0.018em;
  font-weight: 650;
  margin: 0 0 8px;
}
h2 {
  font-size: 1.0625rem;
  line-height: 1.45;
  font-weight: 650;
  margin: 0 0 15px;
}
h3 {
  font-size: 0.9375rem;
  line-height: 1.5;
  font-weight: 600;
  margin: 0 0 8px;
}
p {
  margin: 8px 0;
}
#subtitle {
  font-size: 0.8125rem;
  line-height: 1.6;
}
.muted {
  color: var(--muted);
}
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.header-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}
.workspace-menu {
  position: relative;
}
.workspace-menu > summary {
  list-style: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.8125rem;
  cursor: pointer;
}
.workspace-menu > summary::-webkit-details-marker {
  display: none;
}
.workspace-menu > summary:hover,
.workspace-menu[open] > summary {
  background: #e9eeeb;
  color: var(--ink);
}
.menu-surface {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 12px 32px #17352f18;
}
.menu-surface button {
  width: 100%;
  justify-content: flex-start;
  border: 0;
  background: transparent;
}
.menu-surface button:hover {
  background: var(--green-soft);
}
#app {
  padding-top: 5px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-width: 0;
}
.card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 24px;
}
.metric {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.metriclink {
  display: block;
  text-align: left;
  width: 100%;
  font-weight: 400;
}
.metriclink .muted {
  font-size: 0.8125rem;
}
.metric strong {
  display: block;
  margin: 6px 0 3px;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.metric-hint {
  font-size: 0.6875rem;
  color: var(--green);
}
.workspace-columns,
.two {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 22px;
}
.workspace-columns > *,
.two > * {
  min-width: 0;
}
.work-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.work-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.work-item h3 {
  margin-bottom: 3px;
}
.work-item p {
  font-size: 0.8125rem;
  margin: 0;
}
.work-item-icon {
  display: grid;
  place-items: center;
  align-self: start;
  color: var(--green);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--green-soft);
}
.recent-summary {
  color: var(--muted);
  font-size: 0.8125rem;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 15px 0 22px;
}
.workflow-guide {
  margin-top: 24px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.workflow-guide > summary {
  color: #43554a;
}
.workflow-guide[open] > summary {
  margin-bottom: 20px;
}
.workflow-guide p {
  max-width: 78ch;
  color: var(--muted);
  font-size: 0.8125rem;
}
.pipeline {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.pipeline span {
  padding: 7px 11px;
  background: var(--green-soft);
  color: #355d46;
  border-radius: 7px;
  font-size: 0.8125rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card label {
  font-size: 0.8125rem;
  color: #4f5c54;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.5;
  background: var(--green-soft);
  color: #285e40;
  border-radius: 6px;
  padding: 4px 8px;
  margin: 0 6px 7px 0;
}
.tag.amber {
  background: #f7efd9;
  color: #75561c;
}
.notice,
.gap-summary {
  padding: 16px 20px;
  margin: 18px 0;
  background: #f9f4e8;
  border: 1px solid #e8dec4;
  border-radius: 10px;
  color: #5d4f2f;
  font-size: 0.8125rem;
}
.notice p {
  line-height: 1.75;
}
.notice h3 {
  color: #5c4c28;
}
.gap-summary {
  margin: 0 0 12px;
}
.page-tools,
.sectionhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 20px 0 18px;
}
.page-tools p,
.sectionhead p {
  margin: 0;
}
.stack {
  display: grid;
  gap: 16px;
}
.target-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 6px 0 22px;
}
.target-intro h2 {
  font-size: 1rem;
  margin-bottom: 6px;
  font-weight: 600;
}
.target-intro p {
  font-size: 0.8125rem;
  max-width: 74ch;
}
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.filter-chip {
  min-height: 38px;
  padding: 7px 11px;
  background: transparent;
  font-size: 0.75rem;
  border-color: transparent;
  border-radius: 8px;
  color: #54605a;
}
.filter-chip > span {
  padding: 1px 5px;
  border-radius: 5px;
  background: #e9edeb;
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}
.filter-chip[aria-pressed="true"] {
  color: #174c32;
  background: #e0ece4;
  border-color: #d1e1d6;
}
.filter-chip[aria-pressed="true"] > span {
  background: #c7ddce;
  color: #16442c;
}
.target-filters {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mobile-group {
  display: none;
}
.search-field {
  position: relative;
  display: flex;
  align-items: center;
  width: min(320px, 100%);
}
.search-field > svg {
  position: absolute;
  left: 12px;
  color: #637569;
  pointer-events: none;
}
.search-field input {
  padding-left: 39px;
  margin: 0;
  background: var(--surface);
}
.list-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #69736e;
  font-size: 0.75rem;
  font-weight: 500;
  margin: 0 0 10px;
  padding: 0 5px;
}
.target-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.target-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 44px;
  gap: 14px;
  align-items: start;
  padding: 21px 24px;
  border-bottom: 1px solid var(--line);
  transition: background var(--settle-time);
}
.target-row:last-child {
  border-bottom: 0;
}
.target-row:hover {
  background: #fafcfb;
}
.company-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-top: 2px;
  border: 1px solid #e0eae3;
  border-radius: 10px;
  color: #3b6250;
  background: #eff5f1;
  font-size: 0.875rem;
  font-weight: 600;
}
.target-main {
  min-width: 0;
}
.target-name {
  display: block;
  text-align: left;
  padding: 0;
  min-height: 28px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.target-name:hover {
  color: var(--green);
  background: transparent;
}
.target-reason {
  margin: 5px 0 9px;
  color: #56635b;
  font-size: 0.8125rem;
  line-height: 1.7;
  max-width: 82ch;
}
.target-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #657169;
  font-size: 0.6875rem;
  line-height: 1.6;
  margin: 0;
}
.target-meta span {
  color: #a7b0aa;
}
.row-action,
.icon-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  background: transparent;
  border-color: transparent;
  border-radius: 9px;
  color: #65746b;
}
.row-action:hover {
  color: var(--green);
  background: var(--green-soft);
}
.tablewrap {
  overflow: auto;
  max-width: 100%;
  max-height: min(72dvh, 1000px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #5d6962;
  background: #f4f6f5;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fafcfb;
}
td:first-child {
  min-width: 180px;
}
.companylink {
  display: inline-block;
  text-align: left;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--green);
  font-weight: 600;
  line-height: 1.65;
  text-decoration: none;
}
.companylink:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
}
.table-copy {
  min-width: 180px;
  max-width: 39ch;
}
.table-evidence {
  max-width: 42ch;
  margin-top: 8px;
  color: #66736b;
  font-size: 0.75rem;
  line-height: 1.7;
}
.table-evidence summary {
  color: var(--green);
  font-weight: 500;
}
input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid #c6d0ca;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.875rem;
  line-height: 1.5;
}
input::placeholder,
textarea::placeholder {
  color: #737d77;
  opacity: 1;
}
input:hover,
select:hover,
textarea:hover {
  border-color: #97afa0;
}
input:disabled,
select:disabled,
textarea:disabled {
  color: #66716a;
  background: #f1f4f2;
  opacity: 1;
}
textarea {
  min-height: 96px;
  resize: vertical;
}
.field {
  display: grid;
  gap: 7px;
  margin: 16px 0;
  min-width: 0;
}
.field > label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #44574b;
}
.formgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 24px;
}
.full {
  grid-column: 1/-1;
}
#modal {
  width: min(1024px, calc(100vw - 48px));
  max-height: calc(100dvh - 64px);
  padding: 0;
  border: 1px solid #dde5df;
  border-radius: 18px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 24px 90px #102b2a35;
  overflow: hidden;
}
#modal[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
#modal::backdrop {
  background: #172b2555;
  backdrop-filter: blur(3px);
}
.dialoghead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 18px 14px 26px;
  border-bottom: 1px solid var(--line);
}
.dialoghead h2 {
  margin: 0;
  font-size: 1rem;
}
#mbody {
  padding: 0 26px 26px;
  overflow: auto;
  min-height: 0;
  overscroll-behavior: contain;
  scroll-padding: 76px 0 24px;
}
#mbody > p:first-child,
#mbody > form:first-child {
  margin-top: 20px;
}
#modal-actions {
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: #f8faf9;
}
#modal-actions[hidden] {
  display: none;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
#modal-actions .actions {
  margin: 0;
}
#modal-actions button[data-delete] {
  margin-right: auto;
  color: var(--danger);
  border-color: #e5cece;
}
.detail-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 12px 0;
  margin: 0 0 6px;
  background: var(--surface);
}
.detail-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  color: #4d6255;
  background: #f0f4f1;
  border-radius: 7px;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
}
.detail-nav a:hover {
  background: var(--green-soft);
  color: var(--green);
}
.detail-section {
  min-width: 0;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 76px;
}
.detail-section > .muted {
  font-size: 0.8125rem;
  margin-bottom: 18px;
}
.detail-section textarea {
  min-height: 110px;
}
.detail-section h3 {
  margin-bottom: 6px;
}
.resource {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: var(--surface);
  text-decoration: none;
  font-size: 0.8125rem;
}
.empty {
  text-align: center;
  padding: 44px 20px;
  border-radius: 12px;
  color: #536259;
  background: var(--surface);
}
.empty strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
}
.empty p {
  font-size: 0.8125rem;
}
.loading-state {
  padding: 48px 24px;
  color: var(--muted);
  text-align: center;
}
.job-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.job-row:last-child {
  border-bottom: 0;
}
.job-row > div {
  min-width: 0;
}
.job-row .toolbar {
  flex-shrink: 0;
}
.job-row p {
  margin: 6px 0;
}
.member-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px auto auto;
  gap: 14px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.member-row:last-child {
  border-bottom: 0;
}
.member-row p {
  margin: 0;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0;
}
.checkbox input {
  width: 22px;
  min-width: 22px;
  min-height: 22px;
  accent-color: var(--green);
}
.tabbar {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.tabbar button {
  min-height: 40px;
  border-color: transparent;
  background: transparent;
  font-size: 0.8125rem;
}
.tabbar button.active {
  background: var(--green-soft);
  color: var(--green);
}
.settingform,
.account-layout {
  max-width: 760px;
}
.settingform {
  margin-top: 20px;
}
.link {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.linkbox {
  width: 100%;
  min-height: 78px;
  margin: 16px 0;
}
pre,
.result-json {
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 18px;
  border-radius: 10px;
  background: #f3f6f4;
  font:
    0.8125rem/1.7 ui-monospace,
    monospace;
}
.result-json {
  max-height: 420px;
}
.mono {
  font-family: ui-monospace, monospace;
}
.danger,
.form-message {
  color: var(--danger);
}
.success {
  color: var(--green);
}
.subtle,
.statusline {
  font-size: 0.75rem;
}
.statusline {
  margin-top: 24px;
  color: #68746b;
  line-height: 1.7;
}
.error-panel {
  margin: 18px 0;
  padding: 18px;
  background: #fff2eb;
  border: 1px solid #e4c3ad;
  border-radius: 10px;
  color: #744c31;
}
.error-panel .toolbar {
  margin-top: 14px;
}
.toast {
  position: fixed;
  z-index: 100;
  left: calc(50% + var(--sidebar-width) / 2);
  bottom: 26px;
  max-width: min(540px, calc(100vw - 32px));
  transform: translateX(-50%);
  padding: 13px 20px;
  color: #fff;
  background: #243d30;
  border: 1px solid #3c5747;
  border-radius: 12px;
  box-shadow: 0 8px 28px #102b2a25;
  font-size: 0.875rem;
}
.hidden {
  display: none !important;
}
.auth-body {
  min-height: 100dvh;
  padding: 24px;
  display: grid;
  place-items: center;
  background: #f4f7f5;
}
.auth-shell {
  width: min(440px, 100%);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 12px 36px #17352f08;
}
.auth-brand {
  margin-bottom: 32px;
  color: var(--green);
  font-size: 1.125rem;
  font-weight: 600;
}
.auth-shell h1 {
  font-size: 1.5rem;
}
.auth-shell .primary {
  width: 100%;
  margin-top: 10px;
}
.auth-shell input {
  font-size: 1rem;
}
.auth-shell a {
  color: var(--green);
}
.form-message {
  min-height: 24px;
  font-size: 0.8125rem;
}
.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  margin: 16px 0;
}
.num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--green-soft);
  border-radius: 50%;
  color: var(--green);
  font-size: 0.75rem;
}
.bar {
  height: 5px;
  background: #edf2ee;
  border-radius: 3px;
  margin-top: 9px;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 3px;
}
.mobile-only {
  display: none;
}
#nav-scrim {
  display: none;
}
@media (max-width: 1100px) {
  :root {
    --sidebar-width: 208px;
  }
  #workspace-main {
    padding-inline: 24px;
  }
  .workspace-columns,
  .two {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .member-row {
    grid-template-columns: minmax(130px, 1fr) 110px;
  }
  .header-actions {
    gap: 4px;
  }
  .target-row {
    padding: 18px;
  }
}
@media (max-width: 800px) {
  :root {
    --sidebar-width: 248px;
  }
  .mobile-only {
    display: inline-flex;
  }
  #sidebar {
    transform: translateX(-100%);
    transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
    padding-top: max(20px, env(safe-area-inset-top));
    width: min(290px, 85vw);
    z-index: 31;
    box-shadow: 12px 0 40px #163d3314;
  }
  .nav-open #sidebar {
    transform: translateX(0);
  }
  #nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    border: 0;
    border-radius: 0;
    background: #172b2555;
    width: 100%;
    height: 100%;
  }
  #nav-scrim[hidden] {
    display: none;
  }
  body.nav-open {
    overflow: hidden;
  }
  #workspace-main {
    margin-left: 0;
    padding: 0 24px 28px;
  }
  .top {
    min-height: 104px;
    padding: 20px 0;
    gap: 16px;
  }
  .page-heading {
    gap: 6px;
    align-items: center;
  }
  .page-heading #nav-toggle {
    margin-left: -10px;
  }
  h1 {
    font-size: 1.5rem;
  }
  .header-actions > .primary {
    padding: 9px 12px;
  }
  .toast {
    left: 50%;
  }
  .work-item {
    grid-template-columns: 32px minmax(0, 1fr) auto;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }
  #workspace-main {
    padding: 0 16px max(24px, env(safe-area-inset-bottom));
  }
  .top {
    min-height: 88px;
    padding: 15px 0;
    gap: 8px;
  }
  #subtitle {
    display: none;
  }
  h1 {
    font-size: 1.25rem;
    margin-bottom: 0;
  }
  .header-actions {
    gap: 2px;
  }
  .header-actions > .primary {
    min-width: 44px;
    width: 44px;
    padding: 0;
  }
  .header-actions > .primary span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .workspace-menu > summary {
    padding: 9px;
    font-size: 0.75rem;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 4px;
  }
  .metric {
    padding: 15px 17px;
  }
  .metric strong {
    font-size: 1.75rem;
  }
  .card {
    padding: 20px;
  }
  .target-intro {
    display: block;
    padding-bottom: 16px;
  }
  .target-intro h2 {
    font-size: 0.875rem;
  }
  .target-intro .small {
    margin-top: 10px;
  }
  .filter-chips {
    display: none;
  }
  .target-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .mobile-group {
    display: grid;
    gap: 5px;
  }
  .mobile-group label {
    font-size: 0.75rem;
    color: var(--muted);
  }
  .search-field {
    width: 100%;
  }
  .target-row {
    grid-template-columns: 30px minmax(0, 1fr) 44px;
    padding: 17px 13px;
    gap: 10px;
  }
  .company-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 0.75rem;
  }
  .target-name {
    font-size: 0.875rem;
    min-height: 30px;
  }
  .target-reason {
    font-size: 0.8125rem;
  }
  .target-meta {
    font-size: 0.6875rem;
  }
  .row-action {
    width: 44px;
    min-width: 44px;
    margin-left: -4px;
    min-height: 44px;
  }
  .work-item {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
  }
  .work-item > button {
    grid-column: 2;
    width: fit-content;
  }
  .work-item-icon {
    width: 28px;
    height: 28px;
  }
  .work-item-icon svg {
    width: 18px;
    height: 18px;
  }
  .sectionhead {
    gap: 14px;
  }
  .sectionhead > .toolbar {
    width: 100%;
  }
  #search,
  #filter {
    width: 100% !important;
  }
  .tablewrap table {
    min-width: 780px;
  }
  .formgrid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .full {
    grid-column: auto;
  }
  input,
  select,
  textarea {
    font-size: 1rem;
  }
  #modal {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .dialoghead {
    padding: max(10px, env(safe-area-inset-top)) 12px 10px 18px;
  }
  #mbody {
    padding: 0 18px 24px;
  }
  #modal-actions {
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }
  #modal-actions .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  #modal-actions button.primary {
    grid-column: 1/-1;
  }
  #modal-actions button[data-delete] {
    margin-right: 0;
  }
  .detail-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 10px 0;
  }
  .detail-nav a {
    justify-content: center;
    min-height: 42px;
    font-size: 0.75rem;
    padding: 8px;
  }
  .job-row {
    flex-direction: column;
    gap: 10px;
  }
  .member-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .notice {
    padding: 15px;
  }
  .page-tools {
    align-items: flex-start;
  }
  .auth-shell {
    padding: 28px 22px;
  }
  .auth-brand {
    font-size: 1rem;
  }
  .identity button {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .top {
    background: var(--paper);
    backdrop-filter: none;
  }
  #modal::backdrop {
    backdrop-filter: none;
    background: #172b2570;
  }
}
@media (prefers-contrast: more) {
  :root {
    --muted: #34443a;
    --line: #95a69a;
  }
  .top {
    background: var(--paper);
    backdrop-filter: none;
  }
  button,
  input,
  select,
  textarea {
    border-color: #788d7e;
  }
}

@media (pointer: coarse) {
  button.small,
  .filter-chip,
  .target-name,
  summary,
  .nav-group button {
    min-height: 44px;
  }
}
