:root {
  --ink: #f4f1e8;
  --ink-soft: #b8c3bb;
  --ink-faint: #758078;
  --night: #07100c;
  --night-deep: #030806;
  --panel: #0d1812;
  --panel-2: #132018;
  --line: rgba(225, 241, 230, 0.12);
  --line-strong: rgba(225, 241, 230, 0.23);
  --lime: #b9ff66;
  --lime-deep: #5b8f26;
  --blue: #74dff5;
  --amber: #ffbd62;
  --danger: #ff7e67;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
  --display: "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Avenir Next", "Helvetica Neue", sans-serif;
  --mono: "SFMono-Regular", Menlo, Monaco, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #050806;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 15%, rgba(72, 116, 85, 0.23), transparent 30rem),
    radial-gradient(circle at 85% 75%, rgba(38, 87, 72, 0.18), transparent 34rem),
    #050806;
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.stage-noise {
  position: fixed;
  inset: 0;
  opacity: 0.025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(185, 255, 102, 0.035), transparent 18rem),
    var(--night);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(68px + env(safe-area-inset-top));
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 12, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand > span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand strong {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand small {
  margin-top: 5px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  transform: rotate(30deg);
}

.brand-mark i {
  position: absolute;
  width: 17px;
  height: 9px;
  border: 1.5px solid var(--lime);
  border-radius: 50%;
}

.brand-mark i:nth-child(2) {
  transform: rotate(60deg);
}

.brand-mark i:nth-child(3) {
  transform: rotate(120deg);
}

.brand-mark--large {
  width: 52px;
  height: 52px;
  margin-bottom: 28px;
}

.brand-mark--large i {
  width: 34px;
  height: 17px;
  border-width: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.network-pill,
.operator-chip,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--panel);
}

.network-pill {
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 99px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.network-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(185, 255, 102, 0.12);
}

.operator-chip {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--night);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
}

.offline-banner {
  position: sticky;
  z-index: 25;
  top: calc(68px + env(safe-area-inset-top));
  display: none;
  justify-content: space-between;
  padding: 8px 18px;
  color: var(--night-deep);
  background: var(--amber);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

body.is-offline .offline-banner {
  display: flex;
}

body.is-offline .network-dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 189, 98, 0.15);
}

.view {
  display: none;
  min-height: calc(100dvh - 68px);
  padding: 27px 18px calc(112px + env(safe-area-inset-bottom));
  animation: view-in 260ms ease both;
}

.view.active {
  display: block;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.view-heading--stacked {
  align-items: stretch;
  flex-direction: column;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.time-lockup {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.time-lockup strong {
  font-family: var(--mono);
  font-size: 17px;
}

.time-lockup span {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8px;
}

.next-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(185, 255, 102, 0.3);
  background:
    linear-gradient(140deg, rgba(185, 255, 102, 0.12), transparent 42%),
    var(--panel);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

.next-card::after {
  position: absolute;
  top: -42px;
  right: -36px;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(185, 255, 102, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 14px rgba(185, 255, 102, 0.03),
    0 0 0 28px rgba(185, 255, 102, 0.02);
  content: "";
  pointer-events: none;
}

.next-card-topline,
.followup-head,
.subhead,
.learning-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.signal-label,
.countdown,
.route-badge,
.due-badge,
.status-pill,
.trend-label {
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.signal-label--lime {
  color: var(--lime);
}

.countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
}

.countdown i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.4;
    transform: scale(0.72);
  }
}

.next-person {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 22px;
}

.person-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  color: var(--night);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}

.person-avatar--lime {
  background: var(--lime);
}

.person-avatar--amber {
  background: var(--amber);
}

.person-avatar--blue {
  background: var(--blue);
}

.company-line {
  margin-bottom: 2px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.next-person h2 {
  margin-bottom: 1px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

.next-person p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.session-line {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 13px;
  margin-top: 20px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.session-time {
  display: flex;
  flex-direction: column;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.session-time span {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 750;
}

.session-time small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7px;
}

.session-line p,
.why-line p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.why-line {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 13px;
  margin-top: 14px;
}

.why-line span {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-actions,
.followup-actions {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 750;
}

.button svg {
  width: 15px;
  height: 15px;
}

.button--primary {
  color: #10170f;
  background: var(--lime);
}

.button--quiet {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
}

.button--wide {
  width: 100%;
}

.pulse-ring {
  width: 7px;
  height: 7px;
  border: 1px solid var(--lime);
  border-radius: 50%;
}

.button--quiet.is-active {
  border-color: rgba(185, 255, 102, 0.45);
  color: var(--lime);
  background: rgba(185, 255, 102, 0.06);
}

.button--quiet.is-active .pulse-ring {
  background: var(--lime);
}

.attention-section,
.alternatives-section {
  margin-top: 30px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading--compact {
  margin-bottom: 10px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-count {
  display: grid;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  place-items: center;
  color: var(--night);
  background: var(--amber);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
}

.attention-row,
.alternative-card,
.target-row,
.followup-mini {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.attention-row {
  display: grid;
  grid-template-columns: 34px 1fr 20px;
  gap: 11px;
  align-items: center;
  padding: 13px 0;
}

.attention-icon {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  place-items: center;
}

.attention-icon svg {
  width: 15px;
  height: 15px;
}

.attention-icon--amber {
  color: var(--amber);
  background: rgba(255, 189, 98, 0.1);
}

.attention-icon--blue {
  color: var(--blue);
  background: rgba(116, 223, 245, 0.1);
}

.attention-copy,
.alternative-copy,
.target-copy,
.followup-person {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.attention-copy strong,
.alternative-copy strong,
.followup-mini strong {
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-copy small,
.alternative-copy small,
.followup-mini small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-arrow,
.target-chevron {
  color: var(--ink-faint);
  font-size: 15px;
}

.alternative-card {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 14px 0;
}

.alternative-rank {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-faint);
}

.route-badge {
  padding: 5px 7px;
  border-radius: 2px;
}

.route-badge--warm {
  color: var(--amber);
  background: rgba(255, 189, 98, 0.09);
}

.route-badge--field {
  color: var(--blue);
  background: rgba(116, 223, 245, 0.09);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 45px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.search-box svg {
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.search-box input::placeholder {
  color: var(--ink-faint);
}

.filter-row {
  display: flex;
  gap: 7px;
  margin: 0 -18px 16px;
  padding: 0 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-faint);
  background: transparent;
  font-family: var(--mono);
  font-size: 8px;
}

.filter-chip.active {
  border-color: var(--lime);
  color: var(--night);
  background: var(--lime);
}

.target-row {
  display: grid;
  grid-template-columns: 39px 1fr 16px;
  gap: 11px;
  align-items: center;
  padding: 15px 0;
}

.target-row:last-child {
  border-bottom: 1px solid var(--line);
}

.target-row[hidden] {
  display: none;
}

.target-score {
  display: grid;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
}

.target-copy > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}

.target-copy strong {
  font-size: 12px;
  font-weight: 700;
}

.target-copy em {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 7px;
  font-style: normal;
}

.target-copy small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 9px;
}

.micro-line {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7.5px;
}

.micro-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.micro-dot--amber {
  background: var(--amber);
}

.micro-dot--blue {
  background: var(--blue);
}

.micro-dot--lime {
  background: var(--lime);
}

.capture-timer {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 15px;
}

.capture-promise {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 13px;
  border-left: 2px solid var(--lime);
  background: rgba(185, 255, 102, 0.06);
}

.capture-bolt {
  color: var(--lime);
  font-size: 25px;
}

.capture-promise p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.capture-promise strong {
  color: var(--ink);
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  position: relative;
  display: block;
  margin-bottom: 16px;
}

.field > span:first-child,
.outcome-fieldset legend {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field > span small {
  color: var(--ink-faint);
  font-size: 7px;
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  color: var(--ink);
  background: var(--panel);
}

.field input {
  height: 43px;
  padding: 0 11px;
  font-size: 11px;
}

.field textarea {
  min-height: 132px;
  padding: 12px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(185, 255, 102, 0.55);
  box-shadow: 0 0 0 3px rgba(185, 255, 102, 0.05);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #647067;
}

.dictation-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: var(--ink-faint);
  font-size: 8px;
}

.dictation-hint svg {
  width: 13px;
  height: 13px;
}

.outcome-fieldset {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.outcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.outcome-chip {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 9px;
}

.outcome-chip--strong {
  border-color: rgba(185, 255, 102, 0.2);
}

.outcome-chip.selected {
  border-color: var(--lime);
  color: var(--night);
  background: var(--lime);
  font-weight: 750;
}

.save-capture {
  display: flex;
  width: 100%;
  height: 53px;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border: 0;
  border-radius: 2px;
  color: var(--night);
  background: var(--lime);
}

.save-capture span {
  font-size: 13px;
  font-weight: 800;
}

.save-capture small {
  font-family: var(--mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.capture-receipt {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid rgba(116, 223, 245, 0.32);
  background: rgba(116, 223, 245, 0.045);
}

.capture-receipt[hidden] {
  display: none;
}

.capture-receipt strong {
  display: block;
  margin-top: 12px;
  font-size: 12px;
}

.capture-receipt > p {
  margin: 7px 0 12px;
  color: var(--ink-soft);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 12px;
  line-height: 1.45;
}

.capture-receipt-next {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: 0.05em;
}

.rescue-card {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 19px;
  padding: 15px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: left;
}

.rescue-card span:first-child {
  display: flex;
  flex-direction: column;
}

.rescue-card small {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.rescue-card strong {
  margin-top: 5px;
  font-size: 11px;
}

.rescue-plus {
  color: var(--ink-faint);
  font-size: 20px;
}

.rescue-answer {
  display: none;
  padding: 17px;
  border: 1px solid var(--line);
  border-top: 0;
  background: rgba(255, 189, 98, 0.05);
}

.rescue-answer.open {
  display: block;
}

.rescue-answer p {
  margin-bottom: 12px;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 17px;
  line-height: 1.4;
}

.rescue-answer button,
.subhead button {
  padding: 0;
  border: 0;
  color: var(--lime);
  background: transparent;
  font-family: var(--mono);
  font-size: 8px;
  text-transform: uppercase;
}

.icon-button {
  width: 35px;
  height: 35px;
  border-radius: 50%;
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.followup-card {
  padding: 15px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.followup-card--urgent {
  border-top: 2px solid var(--amber);
}

.followup-head {
  justify-content: flex-start;
  gap: 10px;
}

.followup-head .due-badge {
  margin-left: auto;
}

.followup-person strong {
  font-size: 12px;
}

.followup-person small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
}

.due-badge {
  padding: 6px 7px;
  color: var(--night);
  background: var(--amber);
}

.workflow-strip {
  display: flex;
  align-items: center;
  margin: 17px 0;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 6.5px;
  text-transform: uppercase;
}

.workflow-strip i {
  flex: 1;
  height: 1px;
  margin: 0 5px;
  background: var(--line);
}

.workflow-strip .done {
  color: var(--lime);
}

.workflow-strip .current {
  color: var(--amber);
}

.original-note,
.ai-structure,
.draft-box {
  margin-top: 13px;
  padding: 13px;
  border: 1px solid var(--line);
}

.original-note {
  background: rgba(116, 223, 245, 0.035);
}

.subhead {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.07em;
}

.original-note p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 13px;
  line-height: 1.5;
}

.confidence {
  color: var(--lime);
}

.ai-structure dl {
  margin: 8px 0 0;
}

.ai-structure dl > div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.ai-structure dt {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7px;
  text-transform: uppercase;
}

.ai-structure dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.45;
}

.ai-structure dd.is-editing {
  padding: 5px;
  outline: 1px solid rgba(185, 255, 102, 0.45);
  color: var(--ink);
  background: rgba(185, 255, 102, 0.04);
}

.ai-structure .uncertain {
  border-left: 2px solid var(--amber);
  padding-left: 8px;
}

.uncertain dt span {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 4px;
  color: var(--night);
  background: var(--amber);
  font-size: 6px;
}

.owner-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 13px;
  border: 1px solid var(--line);
}

.owner-line span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 10px;
  border-right: 1px solid var(--line);
}

.owner-line span:last-child {
  border-right: 0;
}

.owner-line small {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 6px;
}

.owner-line strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-box textarea {
  width: 100%;
  min-height: 272px;
  margin-top: 10px;
  padding: 0;
  resize: none;
  border: 0;
  outline: 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 10px;
  line-height: 1.55;
}

.draft-box textarea:not([readonly]) {
  padding: 9px;
  outline: 1px solid rgba(185, 255, 102, 0.35);
  background: rgba(185, 255, 102, 0.025);
}

.sync-receipt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7px;
}

.followup-mini {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px 0;
}

.followup-mini .person-avatar {
  width: 34px;
  height: 34px;
  font-size: 8px;
}

.status-pill {
  padding: 5px 7px;
  color: var(--blue);
  background: rgba(116, 223, 245, 0.09);
}

.status-pill--warm {
  color: var(--amber);
  background: rgba(255, 189, 98, 0.09);
}

.state-matrix {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.state-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.state-row span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.state-row strong {
  font-size: 10px;
}

.state-row small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
}

.state-row em {
  flex: 0 0 auto;
  padding: 4px 6px;
  color: var(--lime);
  background: rgba(185, 255, 102, 0.08);
  font-family: var(--mono);
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.state-row--danger em {
  color: var(--danger);
  background: rgba(255, 126, 103, 0.09);
}

.state-row--conflict em {
  color: var(--amber);
  background: rgba(255, 189, 98, 0.09);
}

.evidence-total {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 750;
  line-height: 0.85;
  text-align: right;
}

.evidence-total small {
  color: var(--ink-faint);
  font-size: 7px;
  font-weight: 500;
}

.learning-hero {
  padding: 18px;
  border: 1px solid rgba(185, 255, 102, 0.3);
  background:
    radial-gradient(circle at 100% 0, rgba(185, 255, 102, 0.1), transparent 14rem),
    var(--panel);
}

.learning-hero h2 {
  margin: 16px 0 10px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.learning-hero > p {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.evidence-button {
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  font-size: 9px;
}

.evidence-stack {
  display: flex;
}

.evidence-stack i {
  display: grid;
  width: 24px;
  height: 24px;
  margin-left: -5px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  place-items: center;
  color: var(--night);
  background: var(--ink);
  font-family: var(--mono);
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
}

.evidence-stack i:first-child {
  margin-left: 0;
}

.learning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 9px;
}

.learning-card {
  padding: 14px;
  border-top: 2px solid var(--blue);
  background: var(--panel);
}

.learning-card--uncertain {
  border-top-color: var(--amber);
}

.learning-number {
  font-family: var(--mono);
  font-size: 20px;
}

.trend-label {
  color: var(--blue);
}

.learning-card--uncertain .trend-label {
  color: var(--amber);
}

.learning-card h3 {
  margin: 20px 0 9px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.learning-card p {
  margin-bottom: 0;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.5;
}

.tomorrow-card {
  margin-top: 24px;
}

.tomorrow-card ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tomorrow-card li {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.tomorrow-card li > span {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 8px;
}

.tomorrow-card li p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
}

.tabbar {
  position: fixed;
  z-index: 40;
  bottom: 0;
  left: 50%;
  display: grid;
  width: min(100%, 430px);
  grid-template-columns: repeat(5, 1fr);
  min-height: calc(69px + env(safe-area-inset-bottom));
  padding: 7px 6px env(safe-area-inset-bottom);
  transform: translateX(-50%);
  border-top: 1px solid var(--line);
  background: rgba(5, 12, 8, 0.94);
  backdrop-filter: blur(18px);
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 0;
  color: var(--ink-faint);
  background: transparent;
  font-family: var(--mono);
  font-size: 7px;
}

.tab svg {
  width: 19px;
  height: 19px;
}

.tab.active {
  color: var(--lime);
}

.tab--capture {
  margin-top: -21px;
}

.capture-orb {
  display: grid;
  width: 48px;
  height: 48px;
  border: 5px solid var(--night);
  border-radius: 50%;
  place-items: center;
  color: var(--night);
  background: var(--lime);
  box-shadow: 0 0 0 1px rgba(185, 255, 102, 0.22);
}

.capture-orb svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.2;
}

.tab-badge {
  position: absolute;
  top: 0;
  right: 18px;
  display: grid;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  place-items: center;
  color: var(--night);
  background: var(--amber);
  font-size: 6px;
  font-weight: 800;
}

.sheet-backdrop {
  position: fixed;
  z-index: 60;
  inset: 0;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.68);
  opacity: 0;
  transition: 200ms ease;
}

.sheet-backdrop.open {
  visibility: visible;
  opacity: 1;
}

.target-sheet,
.evidence-sheet {
  position: fixed;
  z-index: 70;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 430px);
  max-height: 91dvh;
  margin: 0 auto;
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  transform: translateY(105%);
  border-top: 1px solid var(--line-strong);
  background: #0a140f;
  box-shadow: 0 -22px 60px rgba(0, 0, 0, 0.52);
  transition: transform 260ms cubic-bezier(0.22, 0.8, 0.23, 1);
}

.target-sheet.open,
.evidence-sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 38px;
  height: 3px;
  margin: 0 auto 18px;
  border-radius: 99px;
  background: var(--line-strong);
}

.brief-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brief-header .person-avatar {
  width: 48px;
  height: 48px;
}

.brief-header h2 {
  margin-bottom: 2px;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.04em;
}

.brief-header p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.brief-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 17px 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.brief-route span {
  font-family: var(--mono);
  font-size: 8px;
}

.brief-route span:first-child {
  color: var(--amber);
}

.brief-block {
  margin-top: 18px;
}

.brief-block > span {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.brief-block h3 {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.brief-block p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.brief-opener {
  padding: 13px;
  border-left: 2px solid var(--lime);
  background: rgba(185, 255, 102, 0.055);
}

.brief-opener p {
  margin: 0;
  color: var(--ink);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 15px;
  line-height: 1.4;
}

.brief-questions {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.brief-questions li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 7px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
}

.brief-questions li span {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 8px;
}

.guardrail {
  color: var(--amber) !important;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 20px;
}

.evidence-sheet {
  z-index: 80;
  padding-top: 24px;
}

.sheet-close {
  position: absolute;
  top: 14px;
  right: 17px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: transparent;
  font-size: 19px;
}

.evidence-sheet h2 {
  margin-bottom: 20px;
  font-family: var(--display);
  font-size: 29px;
}

.evidence-note {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.evidence-note strong {
  font-size: 10px;
}

.evidence-note p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 14px;
  line-height: 1.45;
}

.operator-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 7, 4, 0.86);
  backdrop-filter: blur(14px);
}

.operator-modal.open {
  display: flex;
}

.operator-panel {
  width: min(100%, 394px);
  padding: 27px 20px 20px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at 80% 10%, rgba(185, 255, 102, 0.1), transparent 15rem),
    var(--panel);
  box-shadow: var(--shadow);
}

.operator-panel h2 {
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: -0.04em;
}

.operator-panel > p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.operator-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.operator-options button {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  padding: 14px 5px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.015);
}

.operator-options button:hover,
.operator-options button:focus {
  border-color: var(--lime);
}

.operator-options button > span {
  display: grid;
  width: 35px;
  height: 35px;
  margin-bottom: 9px;
  border-radius: 50%;
  place-items: center;
  color: var(--night);
  background: var(--lime);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
}

.operator-options strong {
  font-size: 10px;
}

.operator-options small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 7px;
}

.toast {
  position: fixed;
  z-index: 120;
  right: 18px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  left: 18px;
  width: min(calc(100% - 36px), 394px);
  margin: 0 auto;
  padding: 13px 15px;
  transform: translateY(20px);
  visibility: hidden;
  border: 1px solid rgba(185, 255, 102, 0.28);
  opacity: 0;
  color: var(--night);
  background: var(--lime);
  box-shadow: var(--shadow);
  font-size: 10px;
  font-weight: 700;
  transition: 180ms ease;
}

.toast.show {
  visibility: visible;
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 700px) {
  body {
    padding: 26px 0;
  }

  .app-shell {
    min-height: calc(100dvh - 52px);
    border: 1px solid var(--line-strong);
  }

  .tabbar {
    bottom: 26px;
    border-right: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    border-left: 1px solid var(--line-strong);
  }

  .target-sheet,
  .evidence-sheet {
    bottom: 26px;
    max-height: calc(91dvh - 26px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
