:root {
  --bg: #f6f5f0;
  --surface: #fffefa;
  --ink: #29392f;
  --muted: #677167;
  --line: #dcdfd3;
  --accent: #ad5336;
  --accent-hover: #913f29;
  --soft: #eeeee4;
  --green: #52684b;
  --paper: #eae4d2;
  --radius: 12px;
  font-synthesis: none;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  color: inherit;
}
a {
  color: inherit;
  text-underline-offset: 3px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
input,
textarea,
select {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #cdd3c4;
  border-radius: 7px;
}
input,
select {
  min-height: 46px;
  padding: 10px 12px;
}
textarea {
  padding: 12px;
  line-height: 1.6;
  resize: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--green);
}
input[type="checkbox"] {
  width: 19px;
  height: 19px;
  min-height: 19px;
  accent-color: var(--green);
  flex: none;
}
::placeholder {
  color: #878d80;
  opacity: 1;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
[hidden] {
  display: none !important;
}
.rr-icon {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
}
.primary,
.secondary,
.ai-button,
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}
.primary {
  background: var(--accent);
  color: #fffefa;
  border-color: var(--accent);
}
.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.secondary,
.upload-button {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.secondary:hover,
.upload-button:hover {
  background: #f0f1e8;
  border-color: #b9c3af;
}
.text-button,
.account-text-button {
  background: transparent;
  color: var(--green);
  padding: 10px 0;
  text-align: left;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.eyebrow,
.workspace-label {
  font:
    10px/1.5 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.small,
.fine-print {
  font-size: 12px;
  line-height: 1.6;
}
.muted,
.fine-print {
  color: var(--muted);
}
.error,
.warning {
  color: #923f2c;
  font-size: 13px;
  line-height: 1.6;
}
.warning {
  padding: 14px 16px;
  border: 1px solid #dbbb9e;
  border-radius: 7px;
  background: #fbf0e3;
  margin-bottom: 20px;
}
.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 224px;
  display: flex;
  flex-direction: column;
  padding: 30px 20px 22px;
  background: #f0f0e8;
  border-right: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.9px;
  text-decoration: none;
  white-space: nowrap;
}
.brand > span:last-child:not(.radar-logo) {
  margin-left: -9px;
  font-weight: 450;
}
.radar-logo {
  width: 31px;
  height: 36px;
  color: var(--accent);
  display: grid;
  place-items: center;
}
.radar-logo .rr-icon {
  width: 30px;
  height: 30px;
  stroke-width: 1.6;
}
.workspace-label {
  margin: 44px 10px 14px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 45px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 13px;
}
.nav-item .rr-icon {
  width: 19px;
  height: 19px;
}
.nav-item:hover {
  background: #e7eade;
}
.nav-item.selected {
  color: var(--ink);
  background: #e1e6d6;
  font-weight: 600;
}
.nav-item b {
  margin-left: auto;
  font:
    11px ui-monospace,
    monospace;
  padding: 3px 5px;
  background: #d5ddc7;
  border-radius: 3px;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 24px 10px 0;
}
.local-badge {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.green-dot,
.private-pill i {
  width: 5px;
  height: 5px;
  background: #718354;
  border-radius: 50%;
  display: inline-block;
}
.sidebar-bottom p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0 20px;
}
.sidebar-link {
  display: block;
  padding: 8px 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.sidebar-link:hover {
  color: var(--accent);
}
.page {
  margin-left: 224px;
  min-width: 0;
}
.page > header {
  min-height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 34px;
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 14px;
}
.breadcrumb strong {
  font-weight: 500;
  color: var(--ink);
}
.header-right {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 11px;
}
.account-link {
  font-size: 12px;
}
.private-pill {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
}
.action-status {
  min-height: 25px;
  padding: 3px 34px;
  font-size: 12px;
  color: var(--green);
  visibility: hidden;
}
.action-status.visible {
  visibility: visible;
}
main {
  max-width: 1380px;
  margin: auto;
  padding: 5px 34px 0;
}
.sync-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 16px;
  margin-bottom: 26px;
  background: #eef0e6;
  border: 1px solid #dbe0cf;
  border-radius: 8px;
}
.sync-strip strong {
  font-size: 12px;
  font-weight: 600;
}
.sync-strip p {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
.sync-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  flex: none;
  font-size: 12px;
}
.sync-actions .secondary {
  min-height: 36px;
  padding: 8px 11px;
  font-size: 11px;
}
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  gap: 36px;
  align-items: center;
  padding: 16px 0 32px;
}
.hero-copy h1 {
  font:
    normal 53px/1.04 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -2px;
  margin: 17px 0 19px;
}
.hero-copy h1 em {
  font-weight: normal;
  color: #667655;
}
.hero-copy p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  margin-bottom: 22px;
}
.hero-copy .primary {
  min-height: 46px;
}
.next-date-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  min-height: 243px;
  padding: 22px;
  background: #ebe6d6;
  border: 1px solid #d5ceba;
  border-radius: 0 9px 9px 9px;
  box-shadow: none;
}
.next-date-card:hover {
  background: #e7e2d0;
}
.index-tab {
  position: absolute;
  left: -1px;
  bottom: 100%;
  padding: 4px 12px 3px;
  color: #74725d;
  font:
    9px ui-monospace,
    monospace;
  letter-spacing: 1px;
  background: #ebe6d6;
  border: 1px solid #d5ceba;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
}
.next-date-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  color: #78745f;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 1px;
}
.next-date-heading .rr-icon {
  width: 18px;
  height: 18px;
}
#next-date-number {
  font:
    normal 72px/1 Georgia,
    serif;
  letter-spacing: -3px;
  margin: 12px 0 3px;
  color: #4e5b40;
}
#next-date-month {
  font-size: 12px;
  color: #666d58;
}
.index-rule {
  width: 100%;
  border-top: 1px dashed #b8b99f;
  margin: 17px 0 11px;
}
#next-date-item {
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 8px 0 26px;
}
.stat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 19px 20px;
  min-width: 0;
}
.stat:first-child {
  padding-left: 0;
}
.stat + .stat {
  border-left: 1px solid var(--line);
}
.stat-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #79826a;
  flex: none;
  margin-top: 3px;
}
.stat-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.stat strong {
  display: block;
  font:
    normal 30px/1.4 Georgia,
    serif;
}
.stat small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.workspace-tabs {
  display: flex;
  flex-direction: row;
  gap: 24px;
  margin: 0 0 24px;
  border-bottom: 1px solid var(--line);
}
.workspace-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 2px;
  margin-bottom: -1px;
  min-height: 46px;
  background: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.workspace-tabs button .rr-icon {
  width: 18px;
  height: 18px;
}
.workspace-tabs button[aria-pressed="true"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
  font-weight: 600;
}
.workspace-tabs button:hover {
  color: var(--accent);
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 275px;
  gap: 30px;
  align-items: start;
}
.purchase-section,
.right-column {
  min-width: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 8px 0 20px;
}
.section-heading h2 {
  font:
    normal 25px Georgia,
    serif;
  letter-spacing: -0.5px;
  margin: 0;
}
.section-heading h2 span {
  font:
    11px ui-monospace,
    monospace;
  color: var(--muted);
  margin-left: 5px;
}
.search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  min-width: 0;
  max-width: 230px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.search-wrap input {
  min-height: 40px;
  width: 100%;
  padding: 8px 0;
  font-size: 12px;
  background: transparent;
  border: 0;
  outline-offset: -2px;
}
.search-wrap > span {
  color: var(--muted);
  font-size: 19px;
}
.filter-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 11px;
}
.filter-row button {
  padding: 7px 11px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 11px;
  background: transparent;
  color: var(--muted);
}
.filter-row button.active {
  color: var(--green);
  background: #e8ecdd;
  border-color: #d6dec6;
}
.filter-row button:hover {
  border-color: #c6cfb8;
}
.organize-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.organize-tools label,
.agenda-heading label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 10px;
  color: var(--muted);
}
.organize-tools label {
  flex: 1;
  min-width: 115px;
}
.organize-tools select,
.agenda-heading select {
  min-height: 38px;
  padding: 8px;
  font-size: 11px;
  max-width: 100%;
  border-color: var(--line);
}
.favorite-filter {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  min-height: 38px;
  font-size: 11px !important;
}
.list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0 15px;
  font-size: 10px;
  color: var(--muted);
}
.sort-label {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.sort-label select {
  border: 0;
  background: transparent;
  font-size: 11px;
  min-height: 32px;
  padding: 5px 2px;
}
.purchase-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 20px;
  margin-bottom: 13px;
  content-visibility: auto;
  contain-intrinsic-size: auto 245px;
}
.purchase-card:hover {
  border-color: #bcc7ae;
}
.purchase-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.purchase-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 42px;
  background: #eeeee3;
  border-radius: 5px;
  color: #73825e;
  flex: none;
}
.purchase-info {
  flex: 1;
  min-width: 0;
}
.purchase-info h3 {
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.purchase-info p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.item-tags {
  display: block;
  font-size: 10px;
  margin-top: 7px;
  color: #6e775f;
  overflow-wrap: anywhere;
}
.price-label {
  font:
    13px ui-monospace,
    SFMono-Regular,
    monospace;
  padding-top: 3px;
  white-space: nowrap;
}
.purchase-note {
  font-size: 12px;
  color: var(--muted);
  margin: 16px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 80px;
  overflow: auto;
}
.deadlines {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.deadline {
  font-size: 10px;
  padding: 5px 8px;
  background: #f0f1e8;
  color: #667251;
  border: 1px solid #e3e7d6;
  border-radius: 4px;
}
.deadline.urgent {
  background: #f6ecda;
  color: #8a6333;
  border-color: #e8d6b1;
}
.deadline.expired {
  background: #f2e9e3;
  color: #955b48;
  border-color: #e4d1c5;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.card-actions button {
  background: transparent;
  font-size: 11px;
  min-height: 30px;
  padding: 3px 0;
  color: var(--muted);
}
.card-actions button:first-child {
  color: var(--accent);
  font-weight: 600;
}
.card-actions button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.receipt-status {
  margin-top: 9px;
  color: #7b826e;
  font-size: 10px;
}
.empty-state {
  border: 1px dashed #cbd2bc;
  border-radius: 9px;
  text-align: center;
  background: #f9f9f2;
  padding: 42px 24px 25px;
}
.receipt-art {
  margin: 0 auto 20px;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  color: #83916b;
}
.receipt-art .rr-icon {
  width: 62px;
  height: 62px;
  stroke-width: 1;
}
.empty-state h3 {
  font:
    normal 28px Georgia,
    serif;
  margin-bottom: 12px;
}
.empty-state p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  max-width: 330px;
  margin: 0 auto 20px;
}
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
.empty-hint {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 22px;
  margin-top: 25px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.empty-hint span::before {
  content: "· ";
}
.load-more {
  width: 100%;
  margin: 8px 0 18px;
}
.timeline-card,
.tools-card {
  padding: 22px;
  background: #efefe6;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 20px;
}
.timeline-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.timeline-heading h2 {
  font:
    normal 23px/1.2 Georgia,
    serif;
  margin: 0;
}
.timeline-icon {
  color: #7b866b;
}
.timeline-card > p {
  margin: 11px 0 20px;
  color: var(--muted);
  font-size: 12px;
}
.timeline-card > .secondary {
  width: 100%;
  margin-top: 16px;
  font-size: 11px;
}
.timeline-card > small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 9px;
}
.timeline-row {
  display: flex;
  gap: 11px;
  padding: 14px 0;
  border-top: 1px solid #daddcb;
}
.timeline-date {
  flex: none;
  width: 40px;
  text-align: center;
  color: #58684a;
}
.timeline-date strong {
  display: block;
  font:
    normal 25px/1.2 Georgia,
    serif;
}
.timeline-date span {
  font:
    9px ui-monospace,
    monospace;
  text-transform: uppercase;
}
.timeline-copy {
  min-width: 0;
}
.timeline-copy strong {
  font-size: 12px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.timeline-copy p {
  font-size: 10px;
  color: var(--muted);
  margin: 4px 0 0;
}
.timeline-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 12px 0;
}
.timeline-empty > span {
  display: none;
}
.timeline-empty strong {
  color: var(--ink);
  font-weight: 550;
}
.timeline-empty p {
  margin: 7px 0 0;
  line-height: 1.6;
}
.tools-card {
  background: transparent;
}
.tools-card h3 {
  font:
    normal 22px Georgia,
    serif;
  margin: 10px 0 18px;
}
.tool-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  background: none;
  text-align: left;
}
.tool-row > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  font-size: 12px;
}
.tool-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.tool-row > span:last-child .rr-icon {
  width: 16px;
  height: 16px;
}
.tool-row:hover {
  color: var(--accent);
}
.tools-card .fine-print {
  font-size: 10px;
  margin: 14px 0 0;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  min-height: 78px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.footer-divider {
  padding: 0 9px;
  color: #a9b09d;
}
.keyboard-hint {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  background: none;
  min-height: 44px;
  font-size: 11px;
}
kbd {
  display: grid;
  place-items: center;
  width: 23px;
  height: 24px;
  font:
    12px ui-monospace,
    monospace;
  border: 1px solid #d0d6c3;
  border-radius: 4px;
  background: #fafaf3;
  box-shadow: none;
}
.workspace-panel {
  margin-bottom: 28px;
}
.workspace-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 32px 0 25px;
}
.workspace-heading h2 {
  font:
    normal 39px Georgia,
    serif;
  letter-spacing: -1.3px;
  margin: 10px 0 9px;
}
.workspace-heading p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
  margin: 0;
  max-width: 520px;
}
.planner-tools,
.agenda-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.planner-tools .secondary {
  font-size: 11px;
  padding: 10px 12px;
}
.planner-layout {
  display: grid;
  grid-template-columns: minmax(275px, 0.85fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: start;
}
.month-card,
.agenda-card,
.insight-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 23px;
  min-width: 0;
}
.month-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.month-toolbar h3 {
  font:
    normal 23px Georgia,
    serif;
  margin: 0;
  text-align: center;
}
.month-toolbar button {
  min-width: 38px;
  min-height: 38px;
  padding: 5px 10px;
  font-size: 22px;
  background: transparent;
}
.weekdays,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}
.weekdays {
  margin: 23px 0 10px;
  color: var(--muted);
  text-align: center;
  font:
    10px ui-monospace,
    monospace;
}
.month-day {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 53px;
  gap: 3px;
  background: #f3f4eb;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 6px 0;
  font-size: 13px;
}
.month-day:hover {
  border-color: #c2cbb3;
}
.month-day[data-outside="true"] {
  background: transparent;
  color: #99a08c;
}
.month-day[aria-current="date"] {
  border-color: #80916e;
}
.month-day[aria-pressed="true"] {
  background: #536849;
  color: #fffef5;
  border-color: #536849;
}
.day-dot {
  font:
    9px ui-monospace,
    monospace;
  line-height: 10px;
}
#month-today {
  margin-top: 15px;
  font-size: 11px;
}
.agenda-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.agenda-heading h3 {
  font:
    normal 24px Georgia,
    serif;
  margin: 0;
}
.agenda-event {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.agenda-event-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.agenda-event-head h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}
.agenda-date {
  color: #617052;
  background: #eeefe1;
  border-radius: 4px;
  padding: 7px 8px;
  font:
    11px ui-monospace,
    monospace;
  white-space: nowrap;
}
.agenda-event p {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0;
}
.agenda-actions .secondary {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 10px;
  background: transparent;
}
#agenda-limit {
  font-size: 11px;
  margin: 15px 0 0;
}
.planner-empty {
  padding: 42px 10px;
  text-align: center;
}
.planner-empty h3 {
  font:
    normal 25px Georgia,
    serif;
  margin-bottom: 12px;
}
.planner-empty p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.insight-card h3 {
  font:
    normal 39px Georgia,
    serif;
  letter-spacing: -1px;
  margin: 14px 0 27px;
}
.spending-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.spending-row strong {
  font:
    12px ui-monospace,
    monospace;
  padding-top: 3px;
}
.file-action {
  position: relative;
  overflow: hidden;
}
.file-action input {
  position: absolute;
  inset: 0;
  width: 100%;
  cursor: pointer;
  opacity: 0;
}
.file-action:focus-within {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}
body:has(dialog[open]) {
  overflow: hidden;
}
dialog {
  width: 710px;
  max-width: calc(100vw - 40px);
  max-height: calc(100svh - 48px);
  margin: auto;
  padding: 28px;
  border: 1px solid #d4dac9;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 15px 60px #29392f24;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #24312988;
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.modal-header h2 {
  font:
    normal 32px/1.2 Georgia,
    serif;
  letter-spacing: -0.7px;
  margin: 8px 0 0;
}
.icon-button {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  background: #eff1e6;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 27px;
  line-height: 1;
  color: var(--muted);
}
.icon-button:hover {
  background: #e4e9d8;
}
.capture-tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.capture-tabs button {
  flex: 1;
  min-height: 42px;
  padding: 10px 4px;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 12px;
  color: var(--muted);
}
.capture-tabs button[aria-pressed="true"] {
  border-bottom-color: var(--green);
  font-weight: 600;
  color: var(--ink);
}
.capture-section {
  margin-bottom: 20px;
}
.capture-section > label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
#receipt-text {
  width: 100%;
  font-size: 13px;
  min-height: 115px;
}
.capture-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.upload-button input {
  display: none;
}
.image-instructions {
  display: none;
  padding: 18px;
  border: 1px dashed #bbc8a9;
  border-radius: 7px;
  margin-bottom: 12px;
  background: #f4f6ec;
}
.image-instructions strong {
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
}
.image-instructions span {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.capture-section[data-method="image"] .image-instructions {
  display: block;
}
.capture-section[data-method="image"] > label,
.capture-section[data-method="image"] #receipt-text,
.capture-section[data-method="image"] #extract {
  display: none;
}
.capture-section[data-method="manual"] {
  display: none;
}
#ocr-status {
  color: var(--muted);
  font-size: 11px;
  margin: 12px 0;
}
#ocr-progress {
  width: 100%;
  height: 5px;
  accent-color: var(--green);
  display: block;
  margin: 12px 0;
}
#stop-ocr {
  font-size: 11px;
}
#receipt-preview img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  margin: 14px auto 0;
  border: 1px solid var(--line);
  border-radius: 5px;
}
#receipt-preview button {
  display: block;
  background: none;
  color: var(--accent);
  font-size: 12px;
  padding: 10px 0;
}
.ai-assist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 17px;
  background: #eef1e6;
  border: 1px solid #d7dfc8;
  border-radius: 7px;
  margin-bottom: 15px;
}
.ai-assist > div:first-child {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  flex: 1;
  min-width: 200px;
}
.ai-mark {
  color: var(--green);
  padding-top: 3px;
}
.ai-assist strong {
  font-size: 12px;
  font-weight: 600;
}
.ai-assist p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 5px 0 0;
}
.ai-button {
  color: #425c39;
  border-color: #bdcbae;
  background: #f8faef;
  font-size: 12px;
}
.ai-button:hover {
  background: #e4edd8;
}
#ai-evidence {
  width: 100%;
}
#ai-evidence:empty {
  display: none;
}
#ai-evidence summary {
  cursor: pointer;
  font-size: 12px;
}
#ai-evidence p {
  overflow-wrap: anywhere;
}
.ai-filled {
  border-color: #81956a;
  background: #f5f8ed;
}
.review-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
  margin: 18px 0 24px;
}
.form-section-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 18px 0 14px;
  border-top: 1px solid var(--line);
}
.form-section-heading > span {
  font:
    9px ui-monospace,
    monospace;
  background: #e9eddf;
  color: #6b7b54;
  padding: 3px 5px;
  border-radius: 3px;
}
.form-section-heading h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.form-section-heading small {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 17px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  font-size: 14px;
}
.form-grid .wide {
  grid-column: 1/-1;
}
.form-grid textarea {
  min-height: 80px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  padding-top: 20px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.danger {
  margin-right: auto;
  background: none;
  color: #9e503c;
  font-size: 12px;
  min-height: 44px;
  padding: 8px 0;
}
#form-error:empty {
  display: none;
}
#form-error {
  margin: 18px 0 5px;
}
#conflict-backup {
  margin-top: 10px;
}
.utility-dialog {
  width: 600px;
}
#calendar-import-status {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.import-event {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  overflow-wrap: anywhere;
}
#confirm-calendar-import {
  margin-top: 20px;
}
.account-header {
  max-width: 1150px;
  margin: auto;
  padding: 25px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.back-link {
  font-size: 12px;
}
.account-layout {
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 75px;
  align-items: start;
  padding: 62px 28px;
}
.account-intro h1 {
  font:
    normal 50px/1.08 Georgia,
    serif;
  letter-spacing: -1.7px;
  margin: 22px 0;
}
.account-intro em {
  color: #697b57;
  font-weight: normal;
}
.account-intro > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.account-scope {
  background: #eaeedf;
  border: 1px solid #dce3cd;
  border-radius: 8px;
  padding: 22px;
  margin: 28px 0;
}
.account-scope strong {
  font-size: 13px;
}
.account-scope p {
  font-size: 13px;
  line-height: 1.7;
  margin: 8px 0 0;
  color: var(--muted);
}
.account-intro .account-transfer {
  font-size: 12px;
}
.account-panel {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.account-badge {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #e9eddf;
  color: var(--green);
  border-radius: 6px;
  margin-bottom: 20px;
}
.account-panel h2 {
  font:
    normal 31px Georgia,
    serif;
  letter-spacing: -0.6px;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
#account-status {
  min-height: 40px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.account-tabs {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  background: #f0f2e9;
  border-radius: 7px;
  margin: 24px 0;
}
.account-tabs button {
  flex: 1;
  min-height: 40px;
  padding: 8px;
  border-radius: 4px;
  font-size: 13px;
  background: none;
}
.account-tabs button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}
#account-form {
  display: grid;
  gap: 19px;
}
#account-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
#account-form input {
  width: 100%;
  min-width: 0;
  height: 48px;
  font-size: 16px;
}
.password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
}
#show-password {
  background: #edf0e5;
  color: #536849;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
}
#account-submit {
  width: 100%;
  min-height: 47px;
  margin-top: 2px;
}
.account-help {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  margin: 4px 0 16px;
}
.account-text-button {
  margin: 9px 0;
}
.account-id {
  font:
    12px ui-monospace,
    monospace;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.sync-ready {
  padding: 18px;
  margin: 20px 0;
  background: #edf1e3;
  border: 1px solid #dce4cc;
  border-radius: 7px;
  font-size: 13px;
}
.account-dashboard-link {
  width: 100%;
  margin-bottom: 12px;
}
#sign-out {
  width: 100%;
}
.guest-link {
  display: block;
  margin-top: 28px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
#recovery-result {
  font-size: 13px;
  line-height: 1.7;
}
#recovery-key {
  display: block;
  overflow-wrap: anywhere;
  padding: 15px;
  border: 1px dashed #c3cdb1;
  background: #f3f5e9;
  border-radius: 6px;
  font:
    13px/1.7 ui-monospace,
    monospace;
  margin: 16px 0;
}
.recovery-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
}
#recovery-done,
#download-recovery {
  width: 100%;
}
.paper-burst {
  position: fixed;
  width: 140px;
  height: 105px;
  overflow: visible;
  pointer-events: none;
  z-index: 100;
}
@media (max-width: 1150px) {
  .sidebar {
    width: 195px;
    padding: 25px 15px;
  }
  .page {
    margin-left: 195px;
  }
  main {
    padding-left: 25px;
    padding-right: 25px;
  }
  .page > header {
    padding-left: 25px;
    padding-right: 25px;
  }
  .action-status {
    padding-left: 25px;
    padding-right: 25px;
  }
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 20px;
  }
  .intro {
    gap: 26px;
    grid-template-columns: minmax(0, 1fr) 215px;
  }
  .hero-copy h1 {
    font-size: 46px;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .search-wrap {
    max-width: none;
    width: 100%;
  }
}
@media (max-width: 950px) {
  .content-grid,
  .planner-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .right-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .month-card {
    width: 100%;
    max-width: 500px;
  }
  .intro {
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 20px;
  }
  .next-date-card {
    padding: 17px;
  }
  .hero-copy h1 {
    font-size: 41px;
  }
  .stat {
    padding: 15px 12px;
    gap: 5px;
  }
  .stat-icon {
    display: none;
  }
  .stat small {
    display: none;
  }
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  .account-layout {
    gap: 35px;
    grid-template-columns: 1fr 400px;
  }
  .account-intro h1 {
    font-size: 42px;
  }
}
@media (max-width: 720px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 18px 16px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 21px;
  }
  .workspace-label {
    display: none;
  }
  .sidebar nav {
    flex-direction: row;
    margin-top: 18px;
    gap: 4px;
  }
  .nav-item {
    justify-content: center;
    gap: 6px;
    padding: 10px 5px;
    font-size: 12px;
    min-height: 44px;
  }
  .nav-item .rr-icon {
    width: 16px;
    height: 16px;
  }
  .nav-item b {
    margin-left: 2px;
  }
  .sidebar-bottom {
    display: flex;
    gap: 22px;
    margin-top: 6px;
    padding: 0;
  }
  .sidebar-bottom .local-badge,
  .sidebar-bottom p {
    display: none;
  }
  .sidebar-link {
    font-size: 12px;
    min-height: 40px;
    padding: 10px 0;
  }
  .page {
    margin-left: 0;
  }
  .page > header {
    min-height: 57px;
    padding: 12px 16px;
  }
  .breadcrumb,
  #today-label {
    display: none;
  }
  .header-right {
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }
  .account-link {
    font-size: 12px;
  }
  .private-pill {
    font-size: 10px;
  }
  .action-status {
    padding: 2px 16px;
    min-height: 23px;
    font-size: 11px;
  }
  main {
    padding: 4px 16px 0;
  }
  .sync-strip {
    padding: 12px;
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 28px;
  }
  .sync-strip p {
    font-size: 12px;
  }
  .sync-strip strong {
    font-size: 12px;
  }
  .sync-actions {
    width: 100%;
    gap: 8px;
  }
  .sync-actions .secondary {
    min-height: 40px;
    font-size: 12px;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 29px;
    padding: 0 0 25px;
  }
  .hero-copy h1 {
    font-size: 43px;
    letter-spacing: -1.7px;
    margin: 14px 0 15px;
  }
  .hero-copy p {
    font-size: 14px;
  }
  .hero-copy .primary {
    min-height: 46px;
    font-size: 14px;
  }
  .next-date-card {
    display: grid;
    grid-template-columns: 62px 1fr 22px;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    min-height: 94px;
    padding: 14px 17px;
    box-shadow: none;
  }
  .next-date-heading {
    grid-column: 3;
    grid-row: 1/3;
    width: auto;
  }
  .next-date-heading > span:first-child {
    display: none;
  }
  #next-date-number {
    grid-column: 1;
    grid-row: 1/3;
    font-size: 48px;
    margin: 0;
    letter-spacing: -2px;
  }
  #next-date-month {
    grid-column: 2;
    grid-row: 1;
    font-size: 12px;
  }
  #next-date-item {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    max-height: 35px;
    font-size: 11px;
  }
  .index-rule {
    display: none;
  }
  .stats {
    margin: 3px 0 18px;
  }
  .stat {
    display: block;
    padding: 14px 9px;
  }
  .stat:first-child {
    padding-left: 0;
  }
  .stat-label {
    font-size: 11px;
    min-height: 33px;
    line-height: 1.4;
  }
  .stat strong {
    font-size: 27px;
  }
  .workspace-tabs {
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 22px;
  }
  .workspace-tabs button {
    padding: 11px 6px;
    flex: 1;
    font-size: 12px;
    gap: 6px;
  }
  .workspace-tabs button .rr-icon {
    width: 17px;
    height: 17px;
  }
  .section-heading {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 17px;
  }
  .section-heading h2 {
    font-size: 27px;
  }
  .search-wrap {
    max-width: none;
    width: 100%;
  }
  .search-wrap input {
    font-size: 16px;
    min-height: 46px;
  }
  .filter-row {
    gap: 5px;
  }
  .filter-row button {
    flex: 1 1 auto;
    padding: 10px 7px;
    font-size: 12px;
    min-height: 40px;
  }
  .organize-tools {
    gap: 12px;
  }
  .organize-tools label {
    font-size: 12px;
    min-width: 115px;
  }
  .organize-tools select {
    font-size: 16px;
    min-height: 44px;
  }
  .favorite-filter {
    font-size: 12px !important;
    min-height: 44px;
  }
  .list-tools {
    flex-wrap: wrap;
    font-size: 11px;
    gap: 6px;
    padding: 9px 0 17px;
  }
  .sort-label select {
    font-size: 16px;
    max-width: 170px;
  }
  .purchase-card {
    padding: 16px;
    border-radius: 8px;
  }
  .purchase-top {
    gap: 10px;
    flex-wrap: wrap;
  }
  .purchase-symbol {
    width: 31px;
    height: 35px;
  }
  .purchase-symbol .rr-icon {
    width: 20px;
    height: 20px;
  }
  .purchase-info h3 {
    font-size: 16px;
  }
  .purchase-info p {
    font-size: 12px;
  }
  .price-label {
    font-size: 12px;
  }
  .item-tags {
    font-size: 11px;
  }
  .purchase-note {
    font-size: 13px;
  }
  .deadline {
    font-size: 11px;
    line-height: 1.5;
  }
  .card-actions {
    gap: 16px;
    row-gap: 3px;
  }
  .card-actions button {
    font-size: 12px;
    min-height: 40px;
  }
  .receipt-status {
    font-size: 11px;
  }
  .empty-state {
    padding: 32px 18px 22px;
  }
  .empty-state p {
    font-size: 14px;
  }
  .empty-actions {
    gap: 10px;
  }
  .empty-actions .primary {
    font-size: 14px;
  }
  .empty-hint {
    font-size: 11px;
  }
  .right-column {
    display: block;
  }
  .timeline-card,
  .tools-card {
    padding: 20px;
  }
  .timeline-heading h2 {
    font-size: 26px;
  }
  .timeline-card > p,
  .timeline-empty {
    font-size: 13px;
  }
  .timeline-card > .secondary {
    min-height: 44px;
    font-size: 13px;
  }
  .timeline-card > small {
    font-size: 11px;
  }
  .timeline-copy strong {
    font-size: 14px;
  }
  .timeline-copy p {
    font-size: 12px;
  }
  .tool-row > span:nth-child(2) {
    font-size: 14px;
  }
  .tool-row small,
  .tools-card .fine-print {
    font-size: 11px;
  }
  footer {
    gap: 10px;
    flex-wrap: wrap;
    font-size: 11px;
    min-height: 90px;
  }
  .workspace-heading {
    margin-top: 25px;
    gap: 18px;
  }
  .workspace-heading h2 {
    font-size: 35px;
  }
  .workspace-heading p {
    font-size: 14px;
  }
  .planner-tools {
    gap: 8px;
  }
  .planner-tools .primary,
  .planner-tools .secondary {
    font-size: 12px;
    min-height: 44px;
  }
  .month-card,
  .agenda-card,
  .insight-card {
    padding: 17px;
    border-radius: 8px;
  }
  .month-toolbar h3 {
    font-size: 24px;
  }
  .month-toolbar button {
    min-height: 44px;
    min-width: 38px;
  }
  .month-day {
    min-height: 45px;
    font-size: 13px;
  }
  .agenda-heading h3 {
    font-size: 24px;
  }
  .agenda-heading label {
    font-size: 11px;
  }
  .agenda-heading select {
    font-size: 16px;
    max-width: 127px;
    min-height: 44px;
  }
  .agenda-event-head h3 {
    font-size: 16px;
  }
  .agenda-event p {
    font-size: 12px;
  }
  .agenda-actions .secondary {
    font-size: 12px;
    min-height: 44px;
  }
  #agenda-limit {
    font-size: 12px;
  }
  .planner-empty p {
    font-size: 13px;
  }
  .insights-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .spending-row {
    font-size: 13px;
  }
  .spending-row strong {
    font-size: 13px;
  }
  dialog,
  .utility-dialog {
    width: 100%;
    max-width: 100%;
    height: 100svh;
    max-height: 100svh;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 20px 16px;
  }
  .modal-header h2 {
    font-size: 30px;
  }
  .icon-button {
    min-width: 44px;
    min-height: 44px;
  }
  .capture-tabs button {
    font-size: 12px;
    min-height: 47px;
  }
  .capture-section > label {
    font-size: 13px;
  }
  .capture-actions .secondary,
  .upload-button {
    font-size: 13px;
    min-height: 44px;
  }
  .image-instructions span {
    font-size: 13px;
  }
  .ai-assist {
    padding: 14px;
    gap: 10px;
  }
  .ai-assist > div:first-child {
    min-width: 100%;
  }
  .ai-assist strong {
    font-size: 13px;
  }
  .ai-assist p {
    font-size: 12px;
  }
  .ai-button {
    min-height: 44px;
    font-size: 13px;
  }
  .review-note,
  #ocr-status {
    font-size: 12px;
  }
  .form-section-heading h3 {
    font-size: 13px;
  }
  .form-section-heading small {
    font-size: 11px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .form-grid label {
    font-size: 14px;
  }
  .form-grid .wide {
    grid-column: auto;
  }
  input,
  textarea,
  select,
  .form-grid input,
  .form-grid textarea,
  .form-grid select,
  #receipt-text {
    font-size: 16px;
    max-width: 100%;
  }
  .form-grid textarea {
    min-height: 88px;
  }
  .modal-footer {
    gap: 8px;
    flex-wrap: wrap;
  }
  .modal-footer .primary,
  .modal-footer .secondary {
    font-size: 13px;
    min-height: 46px;
  }
  .danger {
    font-size: 12px;
  }
  .account-header {
    padding: 18px 16px;
    gap: 10px;
  }
  .account-header .brand {
    font-size: 19px;
    gap: 6px;
  }
  .back-link {
    font-size: 12px;
  }
  .account-layout {
    display: flex;
    flex-direction: column;
    gap: 35px;
    padding: 20px 16px 40px;
  }
  .account-panel {
    order: -1;
    padding: 22px 20px;
    width: 100%;
  }
  .account-panel h2 {
    font-size: 30px;
  }
  .account-intro {
    padding: 0 4px;
  }
  .account-intro h1 {
    font-size: 38px;
  }
  #account-form label {
    font-size: 13px;
  }
  .account-tabs button {
    min-height: 44px;
    font-size: 13px;
  }
  .account-help,
  .guest-link {
    font-size: 13px;
  }
  .account-text-button {
    font-size: 13px;
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .paper-burst {
    display: none;
  }
}

.timeline-row {
  position: relative;
  padding-right: 19px;
}
.timeline-copy {
  flex: 1;
}
.timeline-row > button {
  position: absolute;
  inset: 0;
  background: transparent;
}
.timeline-row > button > .rr-icon {
  position: absolute;
  right: 0;
  top: calc(50% - 9px);
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.timeline-row:hover .timeline-copy strong {
  color: var(--accent);
}

/* Small tactile details stay inside their own space. */
.primary,
.secondary,
.nav-item,
.month-day,
.next-date-card,
.tool-row {
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}
.next-date-heading .rr-icon {
  transition: transform 160ms ease;
}
.next-date-card:hover .next-date-heading .rr-icon {
  transform: translateX(3px);
}
.receipt-art {
  position: relative;
  background: #eeebdb;
  border: 1px solid #dfdbc5;
  border-radius: 8px 8px 16px 8px;
}
.receipt-art::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 3px;
  background: #b99e6a;
  right: 7px;
  bottom: 10px;
}
.receipt-art .rr-icon {
  width: 50px;
  height: 50px;
  stroke-width: 1.25;
}
.all-clear-stamp {
  width: 108px;
  min-height: 78px;
  margin: 0 auto 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #839471;
  outline: 1px dashed #a5b296;
  outline-offset: -2px;
  border-radius: 50%;
  color: #657b52;
  transform: rotate(-6deg);
}
.all-clear-stamp .rr-icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.8;
}
.all-clear-stamp strong {
  font:
    10px ui-monospace,
    SFMono-Regular,
    monospace;
  letter-spacing: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .primary,
  .secondary,
  .nav-item,
  .month-day,
  .next-date-card,
  .tool-row,
  .next-date-heading .rr-icon {
    transition: none;
  }
  .next-date-card:hover .next-date-heading .rr-icon {
    transform: none;
  }
}

/* Illustrated desk. Its dimensions are reserved before the image loads. */
.desk-scene { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 8px; }
.desk-character { position: relative; display: block; width: 260px; max-width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: transparent; border-radius: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.desk-character:hover, .desk-character:active { background: transparent; transform: none; box-shadow: none; }
.desk-character:focus-visible { outline: 2px dashed var(--accent); outline-offset: -2px; }
.desk-character img, .folder-face { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.folder-eyes { transform-box: fill-box; transform-origin: center; }
.desk-scene .next-date-card { width: 100%; min-height: 0; padding: 18px 20px; display: grid; grid-template-columns: 50px 1fr; column-gap: 12px; }
.desk-scene .index-tab, .desk-scene .index-rule { display: none; }
.desk-scene .next-date-heading { grid-column: 1 / -1; margin-bottom: 8px; }
.desk-scene #next-date-number { grid-row: 2 / 4; font-size: 40px; margin: 0; }
.desk-scene #next-date-month { font-size: 12px; margin: 0; }
.desk-scene #next-date-item { font-size: 11px; margin-top: 5px; }
.account-intro .desk-character { width: 220px; margin: 12px auto; }
@media (max-width: 700px) {
  .intro { grid-template-columns: 1fr; gap: 12px; }
  .desk-scene { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 8px; }
  .desk-character { width: 220px; }
  .desk-scene .next-date-card { padding: 14px 12px; grid-template-columns: 1fr; }
  .desk-scene #next-date-number { grid-row: auto; font-size: 38px; }
  .desk-scene .next-date-heading > span:first-child { display: inline; }
  .account-intro .desk-character { width: 160px; }
}
.desk-scene .next-date-heading { grid-row: 1; }
.desk-scene #next-date-month { grid-column: 2; grid-row: 2; }
.desk-scene #next-date-item { grid-column: 2; grid-row: 3; }
@media (max-width: 700px) {
  .desk-scene #next-date-number { grid-column: 1; grid-row: 2; }
  .desk-scene #next-date-month { grid-column: 1; grid-row: 3; }
  .desk-scene #next-date-item { grid-column: 1; grid-row: 4; }
}

#calendar-connect-dialog { width: min(600px, calc(100% - 32px)); padding: 28px; }
#calendar-connect-dialog > p { color: var(--muted); }
#calendar-connect-dialog .dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
#calendar-connect-dialog h2 { font: normal 30px Georgia, serif; margin: 10px 0 18px; }
#calendar-connect-dialog .calendar-providers { display: grid; gap: 12px; margin: 20px 0; }
.calendar-providers details { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.calendar-providers summary { cursor: pointer; font-weight: 600; min-height: 24px; }
.calendar-providers ol { padding-left: 20px; }
.calendar-providers li + li { margin-top: 8px; }
#calendar-feed-url { margin-bottom: 12px; }
#calendar-connect-status { min-height: 24px; }
@media (max-width: 600px) {
  #calendar-connect-dialog { width: 100%; max-width: 100%; height: 100svh; max-height: 100svh; margin: 0; padding: 20px 16px; border: 0; border-radius: 0; }
}
#calendar-connected > label { display: block; width: 100%; min-width: 0; }
#calendar-feed-url { display: block; width: 100%; min-width: 0; }
.desk-scene .next-date-card { border-radius: 9px; }
#incoming-form { display: grid; gap: 14px; margin: 24px 0; }
#incoming-form label { display: grid; gap: 6px; min-width: 0; }
#incoming-form input { width: 100%; min-width: 0; }
.calendar-help { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 16px 0; }
.calendar-help summary { cursor: pointer; font-weight: 600; }
.incoming-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; }
.connected-source { border: 1px solid var(--line); padding: 16px; border-radius: 8px; margin-top: 12px; overflow-wrap: anywhere; }
.connected-source p { font-size: 12px; color: var(--muted); }
.calendar-source-picker { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.calendar-source-picker select { min-width: 0; max-width: 100%; }
.source-badge { display: inline-block; color: #49617a; background: #e7eef2; border-radius: 5px; padding: 4px 8px; font-size: 11px; }
.external-event { border-left: 3px solid #98aeba; padding-left: 12px; }
.external-event[data-state="ongoing"] { border-left-color: var(--green); background: #f1f4e9; padding-right: 12px; }
.external-event[data-state="ongoing"] .source-badge { color: #405c37; background: #dfe8d3; }

/* Keep content within its own card, including long calendar titles and URLs. */
.agenda-event, .agenda-event-head, .planner-layout > *, .connected-source, dialog form, .purchase-card { min-width: 0; }
.agenda-event h3, .agenda-event p, .connected-source, .purchase-card h3, dialog p, dialog label { overflow-wrap: anywhere; }
.event-links { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.event-links a { max-width:100%; overflow-wrap:anywhere; white-space:normal; }
.event-details { margin:12px 0; }
.event-details summary { cursor:pointer; font-weight:600; padding:8px 0; }
.event-details p { white-space:pre-wrap; line-height:1.55; }
.calendar-month-picker { display:block; max-width:240px; margin:12px 0; }
@media(max-width:600px) {
  .agenda-event h3, .purchase-card h3 { font-size:clamp(1rem,4.5vw,1.2rem); line-height:1.35; }
  .agenda-event-head { flex-wrap:wrap; gap:8px; }
  .agenda-event-head h3 { flex:1 1 160px; }
  .agenda-event p, .connected-source p, dialog p { font-size:.9375rem; line-height:1.5; }
  dialog h2, .workspace-head h2 { font-size:clamp(1.25rem,6vw,1.8rem); overflow-wrap:anywhere; }
  input, select, textarea { min-width:0; max-width:100%; font-size:16px; }
  .agenda-actions > *, .event-links > * { white-space:normal; text-align:center; }
}

@media(max-width:600px) {
  .agenda-event-head { display:flex; flex-direction:column; align-items:flex-start; }
  .agenda-event-head h3 { flex:initial; width:100%; }
  .source-badge, .stat-label, .card-heading, .account-panel, .insight-card, .modal-content { min-width:0; overflow-wrap:anywhere; }
  .stat strong, .insight-card h3 { font-size:clamp(1.25rem,6vw,2rem); overflow-wrap:anywhere; }
  .account-panel h2 { font-size:clamp(1.4rem,7vw,1.875rem); }
  .account-intro h1 { font-size:clamp(1.75rem,8vw,2.375rem); }
  .source-badge { max-width:100%; }
}

/* A single readable control scale. Native dropdown menus retain OS accessibility. */
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
select, .organize-tools select, .agenda-heading select, .sort-label select, .form-grid select {
  font-family:inherit; font-size:1rem; line-height:1.5; font-weight:400;
  height:auto; min-height:48px; width:100%; min-width:0; max-width:100%;
  padding:10px 36px 10px 12px; color:var(--ink); background-color:var(--surface);
  border:1px solid var(--line); border-radius:7px; appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2352684b' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 12px center;
}
select option { font:inherit; color:var(--ink); background:var(--surface); }
.organize-tools label, .agenda-heading label, .sort-label, .calendar-source-picker, .calendar-month-picker {
  font-size:.875rem; line-height:1.45; gap:6px; min-width:0;
}
.sort-label { display:flex; flex-direction:column; align-items:stretch; white-space:normal; }
.agenda-heading label { flex:0 1 220px; }
.organize-tools label { flex:1 1 200px; }
.agenda-event p { font-size:.9375rem; line-height:1.55; }
.event-details a, .event-location a, .event-notes a, .purchase-note a { color:#315d78; text-decoration:underline; overflow-wrap:anywhere; }
@media(max-width:600px) {
  .organize-tools { display:grid; grid-template-columns:minmax(0,1fr); }
  .organize-tools label { min-width:0; width:100%; }
  .agenda-heading { flex-wrap:wrap; align-items:stretch; }
  .agenda-heading label { flex:1 1 100%; width:100%; }
  .sort-label { width:100%; }
  .calendar-source-picker, .calendar-month-picker { max-width:none; width:100%; }
  .form-grid label, #account-form label { font-size:.875rem; line-height:1.45; }
}

.agenda-heading { margin-bottom:16px; }
/* Dialogs own their vertical scrolling; nested flex/grid content may shrink. */
dialog { overflow-x:hidden; overflow-y:auto; }
dialog form, dialog section, dialog details, .modal-header > div, .dialog-heading > div,
.ai-assist > div, .ai-assist > div:first-child > div, .import-event > span {
  min-width:0; max-width:100%; overflow-wrap:anywhere;
}
.form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.capture-tabs button { min-width:0; overflow-wrap:anywhere; }
.form-section-heading { flex-wrap:wrap; }
dialog input:not([type="checkbox"]), dialog textarea, dialog select { box-sizing:border-box; min-width:0; max-width:100%; }
@media(max-width:700px) {
  dialog, dialog.utility-dialog, #calendar-connect-dialog {
    position:fixed; inset:0; width:100%; max-width:100%; min-width:0;
    height:100dvh; max-height:100dvh; margin:0; border:0; border-radius:0;
    padding:20px max(16px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  }
  .form-grid { grid-template-columns:minmax(0,1fr); }
  .ai-assist > div:first-child { min-width:0; flex-basis:100%; }
  .ai-mark { flex-shrink:0; }
  dialog input:not([type="checkbox"]), dialog textarea, dialog select { width:100%; font-size:16px; }
  .modal-footer { flex-wrap:wrap; }
}
/* The full-width form input rule must never apply to inline checkboxes. */
.form-grid input[type="checkbox"], dialog input[type="checkbox"] { width:19px; min-width:19px; max-width:19px; flex:0 0 19px; }

/* One workspace navigation, with record-only views inside Records. */
.sidebar .workspace-tabs { display:flex; flex-direction:column; margin:20px 0; padding:0; gap:6px; border:0; }
.sidebar .workspace-tabs button { display:flex; align-items:center; justify-content:flex-start; width:100%; min-width:0; gap:10px; padding:12px; border:0; border-radius:7px; font-size:15px; }
.record-views { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px; }
.record-view { display:flex; align-items:center; gap:6px; padding:10px 12px; border-radius:7px; background:transparent; min-height:44px; font-size:14px; }
.record-view.selected { background:#e1e6d6; font-weight:600; }
.record-view .rr-icon { width:18px; height:18px; }
.record-view b { font-size:12px; }
@media(max-width:720px) {
  .sidebar .workspace-tabs { flex-direction:row; margin:16px 0 0; gap:4px; }
  .sidebar .workspace-tabs button { flex:1 1 0; justify-content:center; padding:10px 4px; gap:6px; font-size:14px; }
  .record-views { gap:4px; }
  .record-view { flex:1 1 0; justify-content:center; padding:8px 4px; font-size:12px; }
}
