:root {
  color-scheme: light;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font-ui);
  color: #15251f;
  background: #f3f0e7;
}

.scan-inbox h1 { max-width: none; font-family: inherit; font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.4; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.scan-inbox .lede { margin: 1.5rem 0; font-size: 1.1rem; }
.scan-list { padding: 0; list-style: none; }
.scan-list li { padding: 1rem 0; border-bottom: 1px solid #c8cfc8; overflow-wrap: anywhere; }
.scan-list a { display: inline-block; padding: 0.5rem 0; min-height: 44px; color: #1d5440; }
.scan-details { margin: 2rem 0; }
.scan-details dt { margin-top: 1rem; font-weight: 600; }
.scan-details dd { margin: 0.4rem 0; overflow-wrap: anywhere; }
.scan-json { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1rem; border: 1px solid #c8cfc8; border-radius: 0.5rem; font-size: 0.85rem; line-height: 1.6; }
.scan-inbox summary { cursor: pointer; padding: 1rem 0; }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 189, 89, 0.24), transparent 30rem),
    #f3f0e7;
}

.shell {
  width: min(54rem, calc(100% - 3rem));
  margin: 0 auto;
  padding: 12vh 0 4rem;
}

.eyebrow,
.label {
  margin: 0;
  color: #5d6d64;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0.5rem 0 0;
  max-width: 10ch;
  font-family: var(--font-ui);
  font-size: clamp(4rem, 13vw, 8.5rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.82;
}

.lede {
  max-width: 32rem;
  margin: 2.5rem 0 4rem;
  color: #45544c;
  font-size: clamp(1.15rem, 2.8vw, 1.55rem);
  line-height: 1.6;
}

.status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(21, 37, 31, 0.14);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 1rem 3rem rgba(21, 37, 31, 0.07);
  backdrop-filter: blur(1rem);
}

.identity-card,
.login-card {
  margin-top: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(21, 37, 31, 0.14);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.72);
}

.identity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
}

.meta,
.hint {
  margin: 0.4rem 0 0;
  color: #637068;
  font-size: 0.9rem;
}

.identity-list {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.identity-list li {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
}

.identity-list strong {
  width: 4.2rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}

.identity-list span {
  overflow-wrap: anywhere;
}

.actions,
.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.login-actions {
  margin-top: 1rem;
}

.button,
.disabled-button,
.connected,
.text-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.button {
  cursor: pointer;
}

.button--google {
  color: #243028;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(21, 37, 31, 0.18);
}

.button--line {
  color: #fff;
  background: #06c755;
}

.button--accounting {
  color: #fff;
  background: #173f32;
}

.accounting-links {
  margin-top: 1rem;
}

.accounting-shell {
  width: min(72rem, calc(100% - 3rem));
  padding-top: 4rem;
}

.accounting-title {
  font-size: clamp(3rem, 8vw, 6rem);
}

.page-heading,
.journal-card__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.journal-list,
.journal-form,
.activity-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.journal-card,
.journal-form,
.activity-list li {
  padding: 1.25rem;
  border: 1px solid rgba(21, 37, 31, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.journal-card h2 {
  margin: 0.3rem 0;
}

.journal-lines {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
}

.journal-lines th,
.journal-lines td {
  padding: 0.55rem;
  border-bottom: 1px solid rgba(21, 37, 31, 0.1);
  text-align: right;
}

.journal-lines th:first-child,
.journal-lines td:first-child {
  text-align: left;
}

.journal-form label,
.journal-form fieldset {
  display: grid;
  gap: 0.4rem;
}

.journal-form input,
.journal-form select,
.inline-form input {
  min-height: 2.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(21, 37, 31, 0.2);
  border-radius: 0.55rem;
  font: inherit;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
}

.activity-list {
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 2fr) auto;
  gap: 1rem;
}

.empty-state {
  color: #637068;
}

.disabled-button,
.connected {
  color: #68736d;
  background: #e9e7df;
}

.text-button {
  cursor: pointer;
  color: #536159;
  background: transparent;
}

.flash {
  position: fixed;
  z-index: 1;
  top: 1rem;
  left: 50%;
  width: min(36rem, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  transform: translateX(-50%);
  border-radius: 0.8rem;
  box-shadow: 0 0.7rem 2rem rgba(21, 37, 31, 0.12);
}

.flash--notice {
  color: #0d593a;
  background: #dcf7e9;
}

.flash--alert {
  color: #7a291d;
  background: #ffe4df;
}

.value {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  font-weight: 650;
}

.status-dot {
  width: 0.8rem;
  height: 0.8rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #18a56d;
  box-shadow: 0 0 0 0.35rem rgba(24, 165, 109, 0.14);
}

@media (max-width: 42rem) {
  .identity-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
