:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --ink: #111111;
  --muted: #5b6270;
  --line: #d7dce3;
  --panel: #ffffff;
  --accent: #0047ff;
  --accent-strong: #002db3;
  --accent-soft: #eef3ff;
  --danger: #b42318;
  --green: #18a058;
  --blue: #0047ff;
  --amber: #f59e0b;
  --focus: rgba(0, 71, 255, 0.22);
  --shadow: 0 18px 48px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

main,
footer {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 36px;
  height: 36px;
}

.account-menu {
  position: relative;
}

.account-menu::after {
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 14px;
  content: "";
}

.account-dropdown-trigger {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  border: 1px solid #cbd7ea;
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  font-weight: 650;
  cursor: pointer;
  padding: 0 20px;
  box-shadow: none;
}

.account-dropdown-trigger:hover,
.account-menu:focus-within .account-dropdown-trigger,
.account-menu[data-open] .account-dropdown-trigger {
  border-color: #a9bdd9;
  background: #ffffff;
}

.button:focus-visible,
.account-dropdown-trigger:focus-visible,
.dropdown-option:focus-visible {
  outline: 0;
  box-shadow:
    0 0 0 1px var(--panel),
    0 0 0 3px var(--focus);
}

.menu-caret {
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  margin-top: -3px;
  transform: rotate(45deg);
}

.account-dropdown-trigger[aria-expanded="true"] .menu-caret,
.account-menu:hover .menu-caret,
.account-menu:focus-within .menu-caret {
  margin-top: 3px;
  transform: rotate(225deg);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  width: 310px;
  gap: 0;
  border: 1px solid #c8d7ee;
  border-radius: 0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  transform: translateY(-3px);
  transform-origin: top right;
  transition:
    opacity 130ms ease,
    transform 130ms ease,
    visibility 130ms ease;
  visibility: hidden;
}

.account-menu:hover .account-dropdown,
.account-menu:focus-within .account-dropdown,
.account-menu[data-open] .account-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.dropdown-option {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  min-height: 62px;
  padding: 10px 2px;
  text-align: left;
  text-decoration: none;
}

.dropdown-option + .dropdown-option {
  border-top: 1px solid #d7e0ef;
}

.dropdown-option:hover,
.dropdown-option:focus-visible,
.dropdown-option.active {
  background: #f8fbff;
}

.dropdown-option.danger {
  color: var(--danger);
}

.dropdown-option.danger:hover,
.dropdown-option.danger:focus-visible {
  background: #fff7f6;
}

.option-icon {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #c8d7ee;
  background: #f6faff;
  color: #111111;
}

.terminal-icon::before {
  content: ">_";
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.94rem;
  line-height: 1;
}

.user-icon::before {
  width: 10px;
  height: 10px;
  border: 1.8px solid currentColor;
  border-radius: 50%;
  content: "";
  transform: translateY(-3px);
}

.user-icon::after {
  position: absolute;
  bottom: 8px;
  width: 15px;
  height: 8px;
  border: 1.8px solid currentColor;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  border-bottom: 0;
  content: "";
}

.exit-icon::before {
  width: 14px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-right: 0;
  content: "";
}

.exit-icon::after {
  position: absolute;
  width: 12px;
  height: 12px;
  border-top: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
  content: "";
  transform: translateX(2px) rotate(45deg);
}

.option-label {
  display: block;
  font-size: 0.94rem;
  font-weight: 650;
  line-height: 1.2;
}

.option-copy {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero {
  min-height: calc(92vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
  gap: 56px;
  align-items: center;
  padding: 64px 0 48px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.lede {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd7ea;
  border-radius: 0;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.button:hover {
  border-color: #a9bdd9;
}

.button.compact {
  min-height: 32px;
  padding: 0 12px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button.secondary {
  background: var(--panel);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: #b5bfcc;
  background: #ffffff;
}

.product-panel {
  align-self: center;
  border: 1px solid #c7ced8;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  color: var(--muted);
}

.panel-header strong {
  color: var(--ink);
}

.timeline-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.timeline-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.timeline-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 7px;
}

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

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

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

.section {
  padding: 60px 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 30px;
}

.section-heading p:not(.eyebrow),
.signup-copy p {
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article {
  min-height: 168px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
}

.feature-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.feature-grid a {
  color: var(--ink);
  text-decoration: none;
}

.feature-grid a:hover {
  color: var(--accent);
}

.signup-section {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(360px, 1fr);
  gap: 44px;
  align-items: start;
  padding: 72px 0 84px;
}

.signup-copy {
  position: sticky;
  top: 24px;
}

.signup-form {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
}

label,
label span {
  color: var(--ink);
  font-weight: 800;
}

label span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(0, 71, 255, 0.14);
}

input,
select {
  min-height: 46px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 10px 12px;
}

.hidden-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.submit-button {
  width: 100%;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.form-message.error {
  color: #b42318;
}

.form-message.success {
  color: #047857;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 0.94rem;
}

footer span:first-child {
  color: var(--ink);
  font-weight: 900;
}

footer a,
.back-link {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

footer a:hover,
.back-link:hover {
  color: var(--accent);
}

.policy-page {
  max-width: 820px;
  padding: 64px 0 40px;
}

.auth-page {
  min-height: 100vh;
}

.auth-shell,
.account-shell {
  padding: 72px 0;
}

.dashboard-shell {
  padding: 34px 0 72px;
}

.auth-shell {
  max-width: 680px;
}

.auth-shell h1 {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
}

.dashboard-shell h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.account-grid {
  display: grid;
  gap: 14px;
}

.sheet-shell {
  display: grid;
  border: 1px solid #b9c7d8;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
}

.sheet-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #b9c7d8;
  background: #f8fafc;
  padding: 10px 12px;
}

.sheet-toolbar strong,
.sheet-toolbar span {
  display: block;
}

.sheet-toolbar strong {
  line-height: 1.2;
}

.sheet-toolbar span {
  color: var(--muted);
  font-size: 0.86rem;
}

.sheet-create-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(260px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  border-bottom: 1px solid #b9c7d8;
  background: #f4f7fb;
  padding: 12px 14px;
}

.sheet-create-row.measurement-row {
  grid-template-columns:
    minmax(170px, 1fr)
    minmax(130px, 0.8fr)
    minmax(100px, 0.55fr)
    minmax(100px, 0.55fr)
    auto;
}

.sheet-create-row.item-row {
  grid-template-columns: minmax(180px, 0.9fr) minmax(220px, 1fr) minmax(220px, 1fr) auto;
}

.sheet-create-row.task-row {
  grid-template-columns: minmax(180px, 0.9fr) minmax(260px, 1.3fr) minmax(160px, 0.7fr) auto;
}

.sheet-create-row label {
  min-width: 0;
}

.sheet-create-row input {
  min-height: 36px;
  margin-top: 6px;
  border-radius: 0;
}

.sheet-create-row select {
  min-height: 36px;
  margin-top: 6px;
  border-radius: 0;
}

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-dialog {
  width: min(520px, calc(100% - 32px));
  border: 1px solid #b9c7d8;
  background: var(--panel);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 24px 80px rgba(17, 24, 39, 0.22);
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.32);
}

.modal-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.modal-form h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

.modal-form .eyebrow {
  margin-bottom: 6px;
}

.sheet-table-wrap {
  overflow: auto;
  max-height: min(70vh, 760px);
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, rgba(203, 215, 234, 0.42) 1px, transparent 1px) 0 0 / 96px 38px,
    linear-gradient(rgba(203, 215, 234, 0.42) 1px, transparent 1px) 0 0 / 96px 38px;
}

.sheet-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 0.86rem;
  table-layout: fixed;
}

.sheet-table th,
.sheet-table td {
  border-right: 1px solid #cbd7ea;
  border-bottom: 1px solid #cbd7ea;
  padding: 7px 9px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.sheet-table th {
  position: sticky;
  z-index: 1;
  background: #e9eef5;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sheet-column-letters th {
  top: 0;
  height: 28px;
  padding: 4px 8px;
  background: #dfe7f1;
  color: #334155;
  font-size: 0.72rem;
  text-align: center;
}

.sheet-table thead tr:nth-child(2) th {
  top: 28px;
}

.sheet-table td {
  height: 36px;
  color: var(--ink);
  background: #ffffff;
}

.sheet-table tr:nth-child(even) td {
  background: #fbfcfe;
}

.sheet-table tr:hover td {
  background: #eef6ff;
  box-shadow: inset 0 0 0 1px rgba(0, 71, 255, 0.12);
}

.sheet-table th:last-child,
.sheet-table td:last-child {
  border-right: 0;
}

.sheet-table td:nth-child(7),
.sheet-table td:nth-child(8) {
  min-width: 220px;
  color: var(--muted);
  white-space: normal;
}

.row-number {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 44px;
  background: #e9eef5 !important;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right !important;
}

.sheet-corner {
  position: sticky;
  left: 0;
  z-index: 3 !important;
  width: 44px;
  background:
    linear-gradient(135deg, transparent 49%, #b9c7d8 50%, transparent 51%),
    #dfe7f1 !important;
}

.sheet-table th:nth-child(2),
.sheet-table td:nth-child(2) {
  width: 110px;
}

.sheet-table th:nth-child(3),
.sheet-table td:nth-child(3) {
  width: 180px;
}

.sheet-table th:nth-child(4),
.sheet-table td:nth-child(4),
.sheet-table th:nth-child(5),
.sheet-table td:nth-child(5) {
  width: 120px;
}

.sheet-table th:nth-child(6),
.sheet-table td:nth-child(6) {
  width: 150px;
}

.strong-cell {
  font-weight: 750;
}

.sheet-pill,
.status-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border: 1px solid #c8d7ee;
  background: #f6faff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
  padding: 0 8px;
}

.status-pill {
  border-color: #b8dec9;
  background: #effaf3;
  color: #126c39;
  text-transform: capitalize;
}

.empty-table-cell {
  color: var(--muted) !important;
}

.account-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-grid article {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.account-grid p {
  flex: 1;
  color: var(--muted);
}

.card-kicker {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}


.content-page {
  max-width: 960px;
}

.article {
  padding: 64px 0 72px;
}

.article h1 {
  max-width: 900px;
  font-size: clamp(2.8rem, 7vw, 5.6rem);
}

.article section {
  max-width: 760px;
  margin-top: 42px;
}

.article h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.6rem);
  line-height: 1.08;
}

.article h3 {
  margin: 22px 0 8px;
}

.article p,
.article li {
  color: var(--muted);
  font-size: 1.07rem;
}

.article .button {
  margin-top: 8px;
}

.check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.faq {
  border-top: 1px solid var(--line);
  padding-top: 34px;
}

.policy-page h1 {
  margin-top: 24px;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
}

.policy-page h2 {
  margin-top: 34px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.15;
}

.policy-page p {
  color: var(--muted);
  font-size: 1.05rem;
}

@media (max-width: 860px) {
  .hero,
  .signup-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sheet-create-row,
  .sheet-create-row.item-row,
  .sheet-create-row.measurement-row,
  .sheet-create-row.task-row,
  .account-grid {
    grid-template-columns: 1fr 1fr;
  }

  .signup-copy {
    position: static;
  }
}

@media (max-width: 560px) {
  main,
  footer {
    width: min(100% - 24px, 1120px);
  }

  h1 {
    font-size: 3rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .sheet-create-row,
  .sheet-create-row.item-row,
  .sheet-create-row.measurement-row,
  .sheet-create-row.task-row,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .signup-form,
  .product-panel {
    padding: 16px;
  }
}
