* {
  box-sizing: border-box;
}
:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #233043;
  background: #f3f5f7;
  font-synthesis: none;
  font-size: 16px;
  --nav: #172333;
  --accent: #bc541e;
  --line: #dfe5eb;
  --muted: #667487;
  --green: #217148;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.48;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 1.9rem;
  letter-spacing: -0.055em;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}
h2 {
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1rem;
}
p {
  line-height: 1.55;
}
.skip {
  position: fixed;
  left: 16px;
  top: -70px;
  background: white;
  padding: 14px;
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
.startup {
  padding: 50px;
}
.app-shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--nav);
  color: #d4dfeb;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 20px;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
}
.tax-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 20px 24px;
  background: #edf2f7;
  border-left: 3px solid #718398;
  border-radius: 8px;
  margin-bottom: 22px;
}
.tax-intro p {
  margin: 7px 0 0;
  max-width: 800px;
}
.tax-intro > .cell-sub {
  min-width: 180px;
  line-height: 1.7;
}
.tax-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.deduction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.deduction-card {
  padding: 24px;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.deduction-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.deduction-title > svg {
  color: var(--accent);
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.deduction-title h2 {
  margin-bottom: 5px;
}
.deduction-card > p {
  flex: 1;
}
.deduction-card details {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.deduction-card summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.deduction-card details > div {
  padding-top: 16px;
}
.deduction-card h3 {
  margin: 10px 0 6px;
  font-size: 0.9rem;
}
.deduction-card details p {
  font-size: 0.9rem;
}
.source-link {
  color: #32597f;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 18px;
}
.attention-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.attention-row:first-child {
  padding-top: 0;
}
.attention-row:last-child {
  border-bottom: 0;
}
.attention-row > div {
  min-width: 0;
  overflow-wrap: anywhere;
}
.attention-row strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 5px;
}
.attention-row span {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}
.attention-row .button {
  flex-shrink: 0;
}
#help-root {
  position: relative;
  z-index: 40;
}
.help-launcher {
  position: fixed;
  right: 24px;
  bottom: 22px;
  border: 1px solid #43546a;
  border-radius: 28px;
  background: #172333;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 17px 10px 10px;
  box-shadow: 0 6px 20px #17233322;
  font-size: 0.9rem;
  min-height: 46px;
}
.help-launcher:hover {
  background: #2c3c51;
}
.help-symbol {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #f2ad78;
  border-radius: 50%;
  color: #172333;
  font-weight: 750;
}
.help-panel {
  position: fixed;
  right: 24px;
  bottom: 82px;
  width: min(410px, calc(100% - 32px));
  max-height: min(640px, calc(100dvh - 115px));
  border-radius: 18px;
  background: #fff;
  border: 1px solid #d7e0e9;
  box-shadow: 0 20px 70px #17233333;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 10px;
}
.help-head h2 {
  margin: 6px 0;
  font-size: 1.3rem;
}
.help-head .button {
  font-size: 1.4rem;
  min-width: 40px;
}
.help-search {
  padding: 8px 22px 16px;
  border-bottom: 1px solid var(--line);
}
.help-search label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.help-search input {
  width: 100%;
  font-size: 0.875rem;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c3ceda;
  border-radius: 8px;
}
.help-content {
  padding: 20px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.help-content h3 {
  font-size: 0.95rem;
}
.help-result {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
  background: #fafbfd;
  text-align: left;
  padding: 12px;
  margin: 0 0 9px;
  border-radius: 9px;
}
.help-result:hover {
  background: #fff6ed;
  border-color: #eab58b;
}
.help-result strong {
  display: block;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.help-result span {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.help-answer {
  padding-top: 22px;
}
.help-answer h3 {
  margin: 8px 0 12px;
  font-size: 1.1rem;
}
.help-answer p,
.help-answer li {
  font-size: 0.95rem;
  line-height: 1.6;
}
.help-answer ol {
  padding-left: 22px;
}
.help-answer li {
  padding-left: 4px;
  margin: 8px 0;
}
.help-answer .button {
  width: 100%;
}
.help-foot {
  padding: 13px 22px;
  background: #f2f5f8;
  color: #5b6b7e;
  font-size: 0.8rem;
  line-height: 1.55;
  border-top: 1px solid var(--line);
}
#main {
  padding-bottom: 100px;
}
@media (max-width: 720px) {
  .tax-intro {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .tax-metrics,
  .deduction-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .attention-row {
    flex-wrap: wrap;
  }
  .deduction-card {
    padding: 20px;
  }
  .help-panel {
    right: 16px;
    bottom: 80px;
  }
  .help-launcher {
    right: 16px;
    bottom: 18px;
  }
}
@media print {
  #help-root {
    display: none !important;
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.07em;
  padding: 0 12px;
}
.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  gap: 3px;
  transform: rotate(-4deg);
}
.brand-mark i {
  width: 8px;
  height: 10px;
  background: #f7a263;
  border-radius: 1px;
}
.brand-sub {
  font-size: 0.75rem;
  color: #9cabbc;
  padding: 8px 12px 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav {
  display: grid;
  gap: 5px;
}
.nav button {
  border: 0;
  color: inherit;
  background: none;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.nav button svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}
.nav button:hover {
  background: #24364c;
}
.nav button.active {
  background: #344354;
  color: white;
  box-shadow: inset 3px 0 #ee9655;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 30px 12px 0;
  font-size: 0.8rem;
  color: #99aabe;
  line-height: 1.6;
}
.sidebar-bottom strong {
  color: #dbe4ee;
  display: block;
}
.workspace {
  min-width: 0;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 34px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  min-height: 76px;
}
.company {
  font-size: 0.92rem;
  font-weight: 650;
}
.company small {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 4px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sample-pill {
  font-size: 0.75rem;
  letter-spacing: 0.035em;
  font-weight: 650;
  color: #88400e;
  background: #fff0db;
  padding: 7px 10px;
  border-radius: 5px;
  white-space: nowrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid #d4dce5;
  background: white;
  color: #29384b;
  padding: 9px 14px;
  border-radius: 7px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
}
.button:hover {
  background: #f0f3f6;
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.button.primary:hover {
  background: #9f4214;
}
.button.dark {
  background: var(--nav);
  border-color: var(--nav);
  color: white;
}
.button.quiet {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
.button.small {
  min-height: 32px;
  font-size: 0.8rem;
  padding: 6px 10px;
}
.button.danger {
  color: #a83032;
  border-color: #e8c9ca;
}
.button svg {
  width: 17px;
  height: 17px;
}
.mobile-menu {
  display: none;
}
#main {
  padding: 30px 34px 40px;
  max-width: 1660px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}
.page-heading p {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0;
  max-width: 760px;
}
.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #718094;
  font-weight: 650;
  margin-bottom: 10px;
}
.heading-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 24px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 20px;
}
.metric-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}
.metric-value {
  font-size: 1.8rem;
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.metric small {
  font-size: 0.76rem;
  color: var(--muted);
  display: block;
  margin-top: 7px;
}
.metric.emphasis {
  background: var(--nav);
  color: white;
  border-color: var(--nav);
}
.metric.emphasis .metric-label,
.metric.emphasis small {
  color: #bbc8d8;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  margin-bottom: 20px;
}
.panel-head {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e9edf1;
}
.panel-head h2 {
  margin: 0;
}
.panel-head p {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 5px 0 0;
}
.panel-body {
  padding: 22px;
}
.panel-body > p:last-child {
  margin-bottom: 0;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(285px, 1fr);
  gap: 20px;
}
.quick-workflow {
  background: #eaf0f5;
  border: 1px solid #d6e0e9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 23px;
  border-radius: 11px;
  margin-bottom: 24px;
}
.quick-workflow h2 {
  margin: 0 0 6px;
}
.quick-workflow p {
  font-size: 0.85rem;
  margin: 0;
  color: #586b7f;
}
.steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  align-items: center;
  margin-top: 16px;
}
.steps b {
  font-weight: 500;
  background: white;
  border: 1px solid #d6dfe7;
  padding: 7px 10px;
  border-radius: 6px;
}
.steps span {
  color: #8493a4;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th {
  text-align: left;
  font-size: 0.74rem;
  letter-spacing: 0.045em;
  color: #69788b;
  font-weight: 650;
  background: #fafbfc;
  padding: 12px 20px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 20px;
  border-bottom: 1px solid #edf0f3;
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.click-row {
  cursor: pointer;
}
.click-row:hover {
  background: #f7f9fb;
}
.click-row:focus-within {
  background: #f0f5fa;
}
.cell-title {
  font-weight: 600;
  color: #28374a;
  display: block;
}
.cell-sub {
  font-size: 0.77rem;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.nowrap {
  white-space: nowrap;
}
.status {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  background: #edf1f6;
  color: #53667c;
}
.status.green {
  background: #e8f4ed;
  color: #1e6845;
}
.status.yellow {
  background: #fff4d8;
  color: #866110;
}
.status.red {
  background: #fcecec;
  color: #ac3d3c;
}
.status.blue {
  background: #eaf1fc;
  color: #335e99;
}
.status.gray {
  background: #eff1f3;
  color: #647080;
}
.status.orange {
  background: #fff0e5;
  color: #9f501a;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filters label {
  font-size: 0.75rem;
  display: grid;
  gap: 6px;
  color: var(--muted);
}
.filters input,
.filters select {
  min-height: 39px;
  border: 1px solid #d3dce5;
  border-radius: 6px;
  padding: 8px 10px;
  background: white;
  color: #29384b;
  font-size: 0.86rem;
}
.filters .search {
  flex: 1;
  min-width: 210px;
}
.filters .search input {
  width: 100%;
}
.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted);
}
.notice {
  border: 1px solid #e5d7be;
  background: #fff9ee;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 0.85rem;
  color: #78511c;
  line-height: 1.5;
  margin-bottom: 20px;
}
.notice.info {
  background: #edf4fa;
  color: #415f79;
  border-color: #d2e1ee;
}
.muted {
  color: var(--muted);
}
.amount {
  font-variant-numeric: tabular-nums;
}
.positive {
  color: var(--green);
}
.negative {
  color: #b33238;
}
.bar-row {
  display: grid;
  grid-template-columns: 95px 1fr 90px;
  gap: 10px;
  align-items: center;
  margin: 18px 0;
  font-size: 0.82rem;
}
.bar-track {
  height: 11px;
  background: #eef2f6;
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: #54738c;
  border-radius: 3px;
}
.bar-fill.orange {
  background: #d88140;
}
.bar-fill.green {
  background: #36825d;
}
.list-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #edf0f3;
  font-size: 0.875rem;
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row p {
  margin: 0;
}
.list-row small {
  color: var(--muted);
  font-size: 0.76rem;
}
.summary-list {
  margin: 0;
}
.summary-list > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f3;
}
.summary-list dt {
  color: var(--muted);
  font-size: 0.87rem;
}
.summary-list dd {
  margin: 0;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.summary-list .total {
  border-top: 2px solid var(--line);
  font-weight: 700;
  color: var(--nav);
  margin-top: 9px;
}
.summary-list .total dt {
  color: var(--nav);
}
.field-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.5fr);
  gap: 20px;
}
.field-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  background: white;
}
.field-card.selected {
  border-color: #c17036;
  box-shadow: 0 0 0 1px #c17036;
}
.field-card h3 {
  margin: 9px 0 4px;
}
.field-card p {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 12px;
}
.field-card .details-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  margin: 12px 0;
}
.field-card .button {
  width: 100%;
}
.flow-arrow {
  border-top: 1px dashed #bfccd8;
  padding: 17px 5px;
  text-align: center;
  color: #677d92;
  font-size: 0.82rem;
}
.audit-item {
  position: relative;
  padding: 0 0 20px 22px;
  border-left: 1px solid #dbe3ea;
  margin-left: 5px;
  font-size: 0.86rem;
}
.audit-item:before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  left: -4px;
  top: 5px;
  border-radius: 50%;
  background: #c27137;
}
.audit-item strong {
  display: block;
  margin-bottom: 5px;
}
.audit-item small {
  color: var(--muted);
  font-size: 0.76rem;
}
.audit-item:last-child {
  padding-bottom: 0;
}
.validation {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #2b7650;
  background: #edf7f1;
  padding: 13px 20px;
  border-top: 1px solid #d9e9df;
}
.validation.bad {
  background: #fbeeed;
  color: #ac3636;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.review-grid ul {
  padding-left: 20px;
  margin-bottom: 0;
}
.review-grid li {
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 10px 0;
}
.source-links {
  font-size: 0.85rem;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.source-links a {
  color: #2b6088;
}
.source-links a:hover {
  text-decoration-thickness: 2px;
}
dialog {
  width: min(740px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  border: 1px solid #d9e1e9;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 24px 80px #0e1c3444;
  color: #26364b;
}
dialog::backdrop {
  background: #10203475;
  backdrop-filter: blur(2px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 1.3rem;
  margin: 0;
}
.dialog-head p {
  font-size: 0.83rem;
  margin: 6px 0 0;
  color: var(--muted);
}
.dialog-body {
  padding: 22px 26px;
}
.dialog-body .panel {
  margin: 18px 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.form-grid label,
.stack-label {
  display: grid;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-grid input,
.form-grid textarea,
.form-grid select,
.stack-label textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #ccd6e1;
  border-radius: 6px;
  font-size: 0.92rem;
  color: #26364b;
  background: white;
}
.form-grid small {
  font-weight: 400;
  color: var(--muted);
  line-height: 1.4;
}
.form-grid textarea {
  min-height: 82px;
  resize: vertical;
}
.form-error {
  color: #a92c31;
  background: #fceeed;
  border-radius: 5px;
  padding: 11px 14px;
  font-size: 0.86rem;
  line-height: 1.5;
  display: none;
  margin-top: 16px;
}
.form-error:not(:empty) {
  display: block;
}
.close-x {
  border: 0;
  background: #f0f3f6;
  border-radius: 5px;
  min-width: 32px;
  min-height: 32px;
  font-size: 1.25rem;
}
.detail-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 18px;
}
.detail-split strong {
  display: block;
  font-size: 0.9rem;
}
.detail-split span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 6px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #172333;
  color: white;
  border-radius: 8px;
  padding: 14px 20px;
  box-shadow: 0 6px 30px #0003;
  max-width: calc(100vw - 32px);
  font-size: 0.9rem;
  z-index: 120;
  display: none;
}
#toast.show {
  display: block;
}
.footer-note {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 24px;
  line-height: 1.55;
}
.csv-editor {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  padding: 15px;
  font:
    0.8rem/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  border: 1px solid #ccd6e1;
  border-radius: 7px;
}
.chip-toggle {
  display: flex;
  border: 1px solid #ccd6e1;
  border-radius: 6px;
  padding: 3px;
  background: white;
}
.chip-toggle button {
  border: 0;
  background: none;
  color: #53657a;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
}
.chip-toggle button.selected {
  background: #23364e;
  color: white;
}
.check-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 16px;
}
.check-row input {
  margin-top: 4px;
  width: 17px;
  height: 17px;
}
.money-key {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.77rem;
}
.field-head {
  padding: 18px 20px;
  background: var(--nav);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.field-head h2 {
  margin: 0;
}
.field-head span {
  font-size: 0.75rem;
  color: #b9cadc;
}
.inline-link {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  font: inherit;
  color: #2e597f;
  text-decoration: underline;
  text-decoration-color: #b3c7d7;
  text-underline-offset: 3px;
}
.progress {
  height: 5px;
  border-radius: 3px;
  background: #e6ecf1;
  overflow: hidden;
  margin-top: 10px;
}
.progress > i {
  display: block;
  height: 100%;
  background: #33815d;
}
.mobile-menu {
  border: 0;
  background: #eef2f5;
  padding: 8px;
  border-radius: 5px;
}
.mobile-menu svg {
  width: 20px;
  height: 20px;
}
.readiness {
  font-size: 0.8rem;
  border-left: 3px solid #dc8f48;
  padding: 3px 0 3px 13px;
  margin-top: 20px;
  color: #6d553e;
}
.warning-list {
  padding-left: 19px;
  color: #9f4036;
  font-size: 0.85rem;
}
.dialog-wide {
  width: min(1040px, calc(100vw - 32px));
}
@media (min-width: 1500px) {
  .metrics {
    gap: 20px;
  }
  .metric {
    padding: 24px;
  }
}
@media (max-width: 1150px) {
  .app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .topbar {
    padding: 16px 24px;
  }
  #main {
    padding: 26px 24px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .field-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .field-layout td,
  .field-layout th {
    padding: 12px;
  }
  .brand {
    font-size: 1.4rem;
  }
  .field-layout .detail-split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
    position: fixed;
    z-index: 80;
    width: 240px;
  }
  .sidebar.open {
    display: flex;
    box-shadow: 0 0 0 100vmax #10203470;
  }
  .mobile-menu {
    display: inline-flex;
  }
  .company {
    font-size: 0.85rem;
  }
  .topbar {
    padding: 13px 18px;
    gap: 10px;
  }
  .top-actions .sample-pill {
    display: none;
  }
  .top-actions .button {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  .top-actions {
    gap: 5px;
  }
  #main {
    padding: 24px 18px;
  }
  .page-heading {
    gap: 14px;
    flex-direction: column;
  }
  h1 {
    font-size: 1.65rem;
  }
  .page-heading p {
    font-size: 0.9rem;
  }
  .field-layout {
    grid-template-columns: 1fr;
  }
  .field-layout .field-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .field-card {
    margin: 0;
  }
  .quick-workflow {
    align-items: flex-start;
    flex-direction: column;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .panel-head {
    padding: 17px;
  }
  .panel-body {
    padding: 18px;
  }
  .metric {
    padding: 17px;
  }
  .metric-value {
    font-size: 1.55rem;
  }
  td {
    padding: 14px 16px;
  }
  th {
    padding: 12px 16px;
  }
  .field-layout .detail-split {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .metrics {
    gap: 10px;
  }
  .metric-label {
    font-size: 0.75rem;
  }
  .metric-value {
    font-size: 1.35rem;
  }
  .metric small {
    font-size: 0.72rem;
  }
  .company small {
    font-size: 0.71rem;
  }
  .top-actions .button.quiet {
    display: none;
  }
  .form-grid,
  .detail-split {
    grid-template-columns: 1fr;
  }
  .field-layout .field-list {
    grid-template-columns: 1fr;
  }
  .dialog-head,
  .dialog-body {
    padding: 18px;
  }
  .field-layout .detail-split {
    grid-template-columns: 1fr;
  }
  .steps {
    font-size: 0.75rem;
    gap: 6px;
  }
  .review-grid {
    gap: 0;
  }
  .bar-row {
    grid-template-columns: 70px 1fr 75px;
  }
  .filters .search {
    min-width: 100%;
  }
  .panel-head {
    flex-wrap: wrap;
  }
  .topbar {
    padding: 12px;
  }
}
.panel,
.field-layout > section,
.two-col > section,
.review-grid > section {
  min-width: 0;
}
.field-head {
  gap: 12px;
}
.field-head span {
  text-align: right;
}
.summary-list dd {
  overflow-wrap: anywhere;
}
.button {
  max-width: 100%;
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
@media print {
  .sidebar,
  .topbar,
  .heading-actions,
  .filters,
  .button,
  .quick-workflow,
  .footer-note {
    display: none !important;
  }
  .app-shell {
    display: block;
  }
  #main {
    padding: 0;
  }
  body {
    background: white;
  }
  .panel,
  .metric {
    break-inside: avoid;
  }
  table {
    font-size: 10pt;
  }
}

.voice-invitation {padding:0 1.15rem 1rem;display:flex;gap:.7rem;align-items:center;flex-wrap:wrap}
.voice-invitation span {font-size:.8rem;color:var(--muted)}
.voice-panel {position:fixed;z-index:90;right:1.5rem;bottom:1.5rem;width:min(440px,calc(100vw - 2rem));max-height:calc(100dvh - 3rem);overflow:auto;background:#fff;border:1px solid #d4dce5;border-radius:22px;box-shadow:0 18px 80px #17233330;padding:1.25rem}
.voice-panel[hidden],.voice-reopen[hidden],.voice-panel [hidden] {display:none!important}
.voice-head {display:flex;align-items:center;justify-content:space-between;gap:1rem}
.voice-head h2 {margin:.2rem 0;font-size:1.3rem}
.voice-orbit {width:88px;height:88px;border-radius:50%;background:linear-gradient(145deg,#dd8c5333,#bc541e12);border:1px solid #bc541e44;margin:1rem auto;display:grid;place-items:center;position:relative;color:var(--accent);font-size:2rem}
.voice-orbit i {position:absolute;inset:-7px;border:1px solid #bc541e22;border-radius:50%}
.voice-active .voice-orbit i {animation:voicePulse 2s ease-in-out infinite}
@keyframes voicePulse {50% {transform:scale(1.09);opacity:.4}}
@media(prefers-reduced-motion:reduce){.voice-active .voice-orbit i {animation:none}}
.voice-status {text-align:center;font-weight:600;font-size:.95rem;margin-bottom:1rem}
.voice-levels {display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1rem}
.voice-levels label {font-size:.875rem;color:var(--muted)}
.voice-levels meter {display:block;width:100%;height:12px;accent-color:var(--accent)}
.voice-info,.voice-cost {font-size:.875rem;line-height:1.5;color:var(--muted)}
.voice-cost {margin:.7rem 0}.voice-actions {display:flex;gap:.5rem;flex-wrap:wrap}
.voice-transcript {max-height:170px;overflow:auto;border-top:1px solid var(--line);padding-top:.75rem;font-size:.9rem;line-height:1.5}
.voice-transcript p {margin-bottom:.7rem}.voice-transcript strong {display:block;font-size:.78rem;color:var(--muted)}
.voice-results:empty {display:none}.voice-results {margin-top:.75rem}.voice-reopen {position:fixed;right:1.5rem;bottom:5.5rem;z-index:89;background:#fff4eb;color:var(--accent);border-color:#e5b99b}
@media(max-width:600px){.voice-panel {right:1rem;bottom:1rem;max-height:calc(100dvh - 2rem)}}

.counted-mode{display:inline-flex;border:1px solid #c6ced4;border-radius:8px;padding:3px;background:#edf0f2}.counted-mode a,.counted-mode span{padding:7px 12px;border-radius:5px;text-decoration:none;font-size:14px}.counted-mode a{color:#354252}.counted-mode span{background:#172333;color:white}.top-actions{flex-wrap:wrap}

.demo-pagination{display:flex;align-items:center;justify-content:center;gap:18px;padding:18px;flex-wrap:wrap}.demo-pagination span{font-size:14px}.sidebar{overflow-y:auto}.field-list{max-height:72vh;overflow:auto}

.office-form{display:grid;gap:16px}.office-form .form-grid{gap:16px}.office-form label{display:grid;gap:6px}.office-form input,.office-form select{padding:10px;border:1px solid #c9d0d7;border-radius:6px;font:inherit;min-width:0}.office-form .check-row input{width:18px;min-width:18px}.office-form>button{justify-self:start}.panel details{margin:18px 0}.panel summary{cursor:pointer;font-weight:600}#backup-result,#opening-result{margin-top:20px;line-height:1.6}
/* Megan keeps one discreet entry point, with an optional compact video call. */
.help-launcher{display:none!important}.voice-reopen{bottom:1.3rem;right:1.3rem;border:1px solid #d79162;background:#fff8eef0;backdrop-filter:blur(14px);box-shadow:0 8px 30px #17233320;border-radius:99px;padding:.85rem 1.15rem;font-weight:650}
.voice-panel{width:min(370px,calc(100vw - 2rem));border-color:#dfd8d1;border-radius:20px;background:#fffdf9f5;backdrop-filter:blur(18px);max-height:calc(100dvh - 2rem);padding:1rem}.voice-head:focus-visible{outline:2px solid var(--accent);outline-offset:4px}.voice-orbit{width:64px;height:64px;margin:.8rem auto}.voice-info{font-size:.8rem;margin:.7rem 0}.voice-cost{font-size:.72rem;line-height:1.4}.voice-transcript{max-height:105px}.voice-links{display:flex;gap:.65rem;align-items:center;flex-wrap:wrap;font-size:.73rem;margin-top:.55rem}.voice-links .button{font-size:.73rem;padding:.25rem 0}.avatar-stage{position:relative;aspect-ratio:4/3;margin:.8rem 0;border-radius:14px;overflow:hidden;background:linear-gradient(145deg,#172333,#465267)}.avatar-video{display:block;width:100%;height:100%;object-fit:cover}.avatar-label{position:absolute;left:.6rem;bottom:.6rem;padding:.25rem .6rem;background:#172333cc;border-radius:20px;color:white;font-size:.7rem;backdrop-filter:blur(8px)}.voice-video-info{font-size:.75rem;line-height:1.4;color:var(--muted)}.voice-head h2{font-size:1.15rem}.voice-levels{gap:.7rem;margin-bottom:.7rem}.voice-levels label{font-size:.75rem}

.avatar-stage{background:linear-gradient(145deg,#f8f6f2,#dde5ec)}.avatar-stage .avatar-video{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.avatar-canvas{width:100%;height:100%;object-fit:cover;display:block}

.nav-group-label{color:#a8b7ca;font-size:.65rem;text-transform:uppercase;letter-spacing:.09em;padding:18px 12px 5px;font-weight:700}.nav button{padding:9px 12px;font-size:.84rem}.step-launcher{border:1px solid #cc946d;background:#fff8ee;color:#783c16;white-space:nowrap}.next-step-panel{position:fixed;z-index:80;top:90px;right:24px;width:min(340px,calc(100vw - 32px));max-height:calc(100dvh - 120px);overflow:auto;border:1px solid #e5c5a6;border-radius:18px;padding:20px;background:linear-gradient(150deg,#fffdf8,#fff6ea);box-shadow:0 16px 55px #17233324}.next-step-head{display:flex;align-items:center;justify-content:space-between;gap:12px;color:#915122;font-size:.66rem;letter-spacing:.1em;font-weight:750}.next-step-head .button{font-size:23px;line-height:1;padding:0 5px;min-height:32px}.next-step-panel h2{font-size:1.22rem;line-height:1.25;margin:10px 0}.next-step-panel p{font-size:.87rem;line-height:1.6;color:#4e5867}.next-step-panel ol{padding-left:22px;font-size:.82rem;line-height:1.9}.next-step-actions{display:grid;gap:8px;margin:16px 0}.next-step-actions .button{white-space:normal;text-align:left;justify-content:flex-start;font-size:.81rem}.next-step-auto{display:flex;align-items:center;gap:8px;font-size:.76rem;margin:14px 0 8px}.next-step-auto input{width:16px;height:16px;accent-color:#b9652c}.next-step-panel>small{font-size:.66rem;color:#6b7280}.next-step-panel :focus-visible{outline:2px solid #a55426;outline-offset:3px}@media(max-width:700px){.next-step-panel{top:auto;bottom:78px;right:16px;max-height:65dvh}.top-actions .step-launcher{order:-1}}

.form-guidance{margin:0 0 18px;padding:12px 14px;border:1px solid #ead6c3;border-radius:10px;background:#fff8ee}.form-guidance summary{cursor:pointer;font-size:.85rem;font-weight:650;color:#884820}.form-guidance p{font-size:.83rem;line-height:1.55;margin:10px 0 0}
