/* Ottersort demo page: a neutral example accounting app that the real Ottersort screens run on.
   Deliberately plain and brand free. It is not modeled on any vendor's product styling. */
@view-transition { navigation: auto; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --ink: #0f1f1c; --forest: #1b3b34; --paper: #f4f1ea; --brass: #b8924a; --brass-lt: #d6b673;
  --app-bg: #ffffff; --app-text: #1f2328; --app-muted: #667085; --app-line: #e4e7ec; --app-soft: #f6f7f9; --app-accent: #3d5a80;
  --bar-h: 52px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--app-bg); color: var(--app-text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; min-height: 100vh; }

/* ---- demo bar (ours) ---- */
.demo-bar { position: sticky; top: 0; z-index: 50; height: var(--bar-h); display: flex; align-items: center; gap: 16px; padding: 0 20px; background: var(--ink); color: var(--paper); font-family: "Figtree", system-ui, sans-serif; }
.demo-brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.demo-note { margin: 0; font-size: 13px; color: rgba(244, 241, 234, .72); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-actions { display: flex; gap: 8px; align-items: center; }
.bar-btn { font: 600 13px/1 "Figtree", system-ui, sans-serif; height: 34px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.bar-btn.ghost { background: transparent; color: var(--paper); border: 1px solid rgba(244, 241, 234, .28); }
.bar-btn.ghost:hover { background: rgba(244, 241, 234, .1); border-color: rgba(244, 241, 234, .5); }
.bar-btn.solid { background: var(--paper); color: var(--ink); border: 1px solid var(--paper); }
.bar-btn.solid:hover { background: #fff; }
.bar-btn:focus-visible, .cards button:focus-visible, .seg button:focus-visible { outline: 2px solid var(--brass-lt); outline-offset: 2px; }

/* ---- example app ---- */
.app { view-transition-name: app-window; background: var(--app-bg); min-height: calc(100vh - var(--bar-h)); }
.app-top { height: 50px; border-bottom: 1px solid var(--app-line); display: flex; align-items: center; gap: 28px; padding: 0 28px; color: var(--app-muted); font-size: 13px; }
.app-co { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--app-text); white-space: nowrap; }
.app-dot { width: 18px; height: 18px; border-radius: 6px; background: var(--app-accent); }
.app-nav { display: flex; gap: 22px; flex: 1; min-width: 0; overflow: hidden; }
.app-nav span { padding: 15px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.app-nav .on { color: var(--app-text); font-weight: 600; border-bottom-color: var(--app-accent); }
.app-user { width: 28px; height: 28px; border-radius: 50%; background: var(--app-soft); border: 1px solid var(--app-line); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.app-main { padding: 24px 28px 120px; max-width: 1280px; }
h1 { font-size: 24px; line-height: 1.2; margin: 0 0 18px; font-weight: 700; letter-spacing: -.01em; }

.cards { display: flex; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.cards button { font: inherit; color: inherit; text-align: left; background: var(--app-bg); border: 1px solid var(--app-line); border-radius: 10px; padding: 12px 16px; min-width: 176px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cards button:hover { border-color: #c5cad3; }
.cards button b { display: block; font-weight: 600; }
.cards button small { color: var(--app-muted); font-size: 12.500px; }
.cards button[aria-pressed="true"] { border-color: var(--app-accent); box-shadow: inset 0 -3px 0 var(--app-accent); }

.bar { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; min-height: 44px; position: relative; }
.seg { display: inline-flex; flex: none; }
.seg button { font: inherit; font-weight: 600; height: 36px; padding: 0 18px; border: 1px solid #c5cad3; background: transparent; color: inherit; margin-left: -1px; cursor: pointer; }
.seg button:first-child { border-radius: 18px 0 0 18px; margin-left: 0; }
.seg button:last-child { border-radius: 0 18px 18px 0; }
.seg button[aria-pressed="true"] { background: #eef2f7; border-color: var(--app-accent); color: var(--app-accent); position: relative; z-index: 1; }
.grow { flex: 1; }
.bar-note { color: var(--app-muted); font-size: 12.500px; white-space: nowrap; }

.table-wrap { border-top: 1px solid var(--app-line); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--app-line); font-size: 13px; }
th { color: var(--app-muted); font-weight: 600; font-size: 12px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.cat-muted { color: var(--app-muted); }
td.cat-match { color: var(--app-accent); font-weight: 600; }
tbody tr:hover { background: var(--app-soft); }
.empty { color: var(--app-muted); padding: 36px 12px; margin: 0; text-align: center; }

/* ---- spotlight on the Ottersort button ---- */
.spot { position: absolute; z-index: 40; pointer-events: none; }
.spot-ring { position: absolute; inset: 0; border-radius: 999px; box-shadow: 0 0 0 2px var(--brass), 0 0 0 10px rgba(184, 146, 74, .22); animation: spot 2.200s ease-in-out infinite; }
.spot-label { position: absolute; left: calc(100% + 18px); top: 50%; transform: translateY(-50%); background: var(--ink); color: var(--paper); font: 600 13px/1 "Figtree", system-ui, sans-serif; padding: 10px 14px; border-radius: 999px; white-space: nowrap; box-shadow: 0 8px 24px rgba(15, 31, 28, .22); display: none; }
.spot-label::before { content: ""; position: absolute; left: -5px; top: 50%; width: 10px; height: 10px; background: var(--ink); transform: translateY(-50%) rotate(45deg); border-radius: 2px; }
@keyframes spot { 0%, 100% { box-shadow: 0 0 0 2px var(--brass), 0 0 0 6px rgba(184, 146, 74, .28); } 50% { box-shadow: 0 0 0 2px var(--brass), 0 0 0 16px rgba(184, 146, 74, 0); } }

/* ---- coach hint ---- */
.coach[popover] { border: 0; margin: 0; inset: auto auto 22px 22px; overflow: visible; }
.coach { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 12px; max-width: min(640px, calc(100vw - 24px)); background: var(--ink); color: var(--paper); padding: 10px 18px 10px 10px; border-radius: 999px; box-shadow: 0 14px 40px rgba(15, 31, 28, .28); font-family: "Figtree", system-ui, sans-serif; }
.coach p { margin: 0; font-size: 14px; line-height: 1.35; }
.coach-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.coach-cta { flex: none; color: var(--ink); background: var(--paper); font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 999px; text-decoration: none; margin-right: -8px; }
.coach.bump { animation: bump .35s ease-out; }
@keyframes bump { 0% { transform: translateX(-50%) translateY(8px); opacity: .4; } 100% { transform: translateX(-50%); opacity: 1; } }

/* ---- embed mode: the picture of the app inside the landing page hero ---- */
.embed .demo-bar, .embed .coach { display: none; }
.embed body { overflow: hidden; }
.embed .app { min-height: 100vh; }
.embed .spot-label { display: block; }
.embed .app-main { padding: 16px 28px 24px; }
.embed h1 { font-size: 21px; margin-bottom: 12px; }
.embed .cards { margin-bottom: 16px; }
.embed .app-top { height: 44px; }
.embed .app-nav span { padding: 12px 0; }

@media (min-width: 1180px) {
  .coach { left: 22px; transform: none; max-width: 264px; border-radius: 20px; padding: 14px 16px; align-items: flex-start; flex-wrap: wrap; }
  .coach.bump { animation-name: bump-l; }
  .coach-cta { margin: 0 0 0 40px; }
}
@keyframes bump-l { 0% { translate: 0 8px; opacity: .4; } 100% { translate: 0 0; opacity: 1; } }
@media (max-width: 760px) {
  .demo-note { display: none; }
  .demo-bar { padding: 0 12px; gap: 8px; }
  .demo-actions { margin-left: auto; }
  .demo-actions a.ghost { display: none; }
  .app-top { padding: 0 16px; gap: 16px; }
  .app-nav span:not(.on) { display: none; }
  .app-main { padding: 18px 16px 130px; }
  .cards button { min-width: 0; flex: 1 1 140px; }
  .c-payee, td.c-payee { display: none; }
  .bar-note { display: none; }
  th, td { padding: 9px 8px; }
  .coach { border-radius: 20px; }
}
@media (max-width: 760px) {
  th:nth-child(4), td:nth-child(4) { display: none; }
  .embed .spot-label { left: 50%; top: calc(100% + 16px); transform: translateX(-50%); }
  .embed .spot-label::before { left: 50%; top: -5px; transform: translateX(-50%) rotate(45deg); }
}
/* On a phone the Ottersort button has no room beside the tabs, so it floats at the top right, as it
   does on a narrow window in the real product. Leave it a clear strip above the page title. */
@media (max-width: 560px) {
  html:not(.embed) .app-top { display: none; }
  html:not(.embed) .app-main { padding-top: 92px; }
}
@media (prefers-reduced-motion: reduce) { .spot-ring, .coach.bump { animation: none; } }
