/* KiraTax. White page, one green accent, soft rounded cards. */
:root {
  --ink: #0e1512;
  --muted: #5b6862;
  --line: #e3e8e5;
  --tint: #eef7f2;
  --green: #08784b;
  --green-dark: #055c39;
  --red: #c8372d;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 24px;
}

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

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.sub {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

a {
  color: var(--green-dark);
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

.error {
  color: var(--red);
  font-weight: 600;
  margin-top: 14px;
}

/* Header */
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-block: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
}

.logo img {
  display: block;
  width: auto;
  height: 40px;
}

.nav .link {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav .link:hover {
  color: var(--ink);
}

/* Buttons */
.btn {
  display: inline-block;
  font: 700 0.98rem/1 var(--font);
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn.green {
  background: var(--green);
}

.btn.green:hover {
  background: var(--green-dark);
}

.btn.ghost {
  background: #fff;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.btn.ghost:hover {
  background: var(--tint);
}

.btn.block {
  width: 100%;
  margin-top: 20px;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: progress;
}

.text-button {
  font: inherit;
  font-weight: 600;
  color: var(--green-dark);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

/* Forms */
.field {
  margin-top: 14px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea,
.line-row input,
.line-row select {
  width: 100%;
  font: 500 1rem var(--font);
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.field input[type='file'] {
  font-size: 0.9rem;
  padding: 10px;
}

.year {
  font: 600 1rem var(--font);
  color: var(--ink);
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

/* Cards and relief lines */
.card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  background: #fff;
}

.total {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}

.total strong {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.row {
  padding-block: 12px;
  border-top: 1px solid var(--line);
}

.row-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.95rem;
  font-weight: 500;
}

.row-top span {
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--tint);
  margin-top: 10px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green);
}

.row.full .row-top span {
  color: var(--red);
  font-weight: 700;
}

.row.full .bar i {
  background: var(--red);
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.ledger th,
.ledger td {
  text-align: left;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;
}

.ledger th {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.ledger tbody tr:last-child td {
  border-bottom: 0;
}

.ledger .amount {
  text-align: right;
  white-space: nowrap;
  padding-right: 0;
}

.scroll {
  overflow-x: auto;
}

/* Landing */
.hero {
  text-align: center;
  padding: 72px 0 56px;
}

.pill {
  display: inline-block;
  background: var(--tint);
  color: var(--green-dark);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero p {
  max-width: 560px;
  margin: 22px auto 30px;
  color: var(--muted);
  font-size: 1.15rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero .actions {
  justify-content: center;
}

.window {
  border-radius: 20px;
  box-shadow:
    0 0 0 1px var(--line),
    0 24px 40px -24px rgba(14, 21, 18, 0.22);
  overflow: hidden;
  background: #fff;
}

.chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}

.chrome span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.chrome b {
  margin-left: 12px;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--muted);
}

.demo {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
}

.pane {
  padding: 28px;
  min-width: 0;
}

.pane + .pane {
  border-left: 1px solid var(--line);
}

.pane > .sub {
  margin-bottom: 18px;
}

.result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--green-dark);
  font-weight: 600;
}

.result.over {
  background: #fdeeec;
  color: var(--red);
}

.section {
  padding-top: 96px;
}

.section > h2 {
  text-align: center;
  margin-bottom: 40px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step b {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--green-dark);
  font-weight: 800;
  margin-bottom: 18px;
}

.step p {
  color: var(--muted);
  margin-top: 8px;
  font-size: 0.98rem;
}

.narrow {
  max-width: 760px;
  margin-inline: auto;
}

details {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 12px;
}

summary {
  font-weight: 700;
  cursor: pointer;
}

details p {
  color: var(--muted);
  margin-top: 8px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-block: 96px 48px;
  padding: 56px 40px;
  border-radius: 28px;
  background: var(--tint);
}

footer {
  padding-block: 0 40px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

/* App */
.auth {
  max-width: 440px;
  margin: clamp(32px, 8vw, 80px) auto;
}

.auth h1,
.view h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
}

.auth .actions {
  margin-top: 22px;
}

.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
  background: #f6f8f7;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  background: #fff;
  border-right: 1px solid var(--line);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.side-nav a:hover {
  color: var(--ink);
  background: #f6f8f7;
}

.side-nav a.on {
  color: var(--green-dark);
  background: var(--tint);
}

.side-foot {
  margin-top: auto;
  display: grid;
  gap: 6px;
  justify-items: start;
  overflow-wrap: anywhere;
}

.main-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.main-top input {
  flex: 1 1 240px;
  max-width: 420px;
  font: 500 0.95rem var(--font);
  color: var(--ink);
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  max-width: 1040px;
  margin-inline: auto;
  padding: 32px 24px 48px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card > .sub {
  margin-bottom: 12px;
}

.label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.big {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 20px;
  align-items: start;
}

.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.item:hover strong {
  text-decoration: underline;
}

.date {
  display: grid;
  place-items: center;
  align-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.date small {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}

.item-main {
  display: grid;
  min-width: 0;
  margin-right: auto;
  overflow-wrap: anywhere;
}

.item-main small {
  font-size: 0.85rem;
  color: var(--muted);
}

.item-amount {
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--tint);
  color: var(--green-dark);
  font-size: 0.8rem;
  font-weight: 600;
}

.month {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.tabs {
  justify-self: start;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #e6ece9;
}

.tabs button {
  font: 600 0.9rem var(--font);
  padding: 8px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.tabs button.on {
  background: #fff;
  color: var(--ink);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin: 16px 0 0;
}

.facts dt {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}

.full {
  grid-column: 1 / -1;
}

.field textarea {
  resize: vertical;
}

.line-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 110px minmax(0, 1.5fr) auto;
  gap: 8px;
  align-items: center;
  margin-block: 10px;
}

.file-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.file-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  overflow-wrap: anywhere;
}

.danger,
.btn.ghost.danger {
  color: var(--red);
}

@media (max-width: 820px) {
  .demo,
  .steps,
  .shell,
  .grid2,
  .form-grid,
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .pane + .pane {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .nav .link {
    display: none;
  }

  .cta {
    padding: 36px 24px;
  }

  .side {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .side-nav {
    order: 3;
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
  }

  .side-nav a {
    white-space: nowrap;
  }

  .side-foot {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .line-row {
    grid-template-columns: minmax(0, 1fr) 110px;
  }
}
