/* Whispify's look, carried over: Atlassian's palette and density — navy text
   rather than black, a sunken grey behind white surfaces, hairline borders —
   under a layer of frosted glass. The dark values are Atlassian's dark
   tokens, so the two themes agree. */
:root {
  --radius: 5px;
  --radius-lg: 12px;
  --background: #ffffff;
  --foreground: #172b4d;
  --card: #ffffff;
  --sunken: #f7f8f9;
  --primary: #0c66e4;
  --primary-foreground: #ffffff;
  --primary-hover: #0055cc;
  --secondary: #f1f2f4;
  --secondary-hover: #dcdfe4;
  --muted-foreground: #626f86;
  --accent: #f1f2f4;
  --selected: #e9f2ff;
  --selected-text: #0c66e4;
  --destructive: #c9372c;
  --border: #dfe1e6;
  --ring: #4c9aff;
  --sidebar: #f7f8f9;

  --glass: rgb(255 255 255 / 72%);
  --glass-strong: rgb(255 255 255 / 88%);
  --glass-blur: saturate(180%) blur(20px);
  --glass-edge: inset 0 1px 0 rgb(255 255 255 / 70%);
  --glass-shadow: 0 8px 24px rgb(9 30 66 / 7%), 0 1px 3px rgb(9 30 66 / 6%);
  --pop-shadow: 0 12px 32px rgb(9 30 66 / 16%);
  --ring-halo: rgb(12 102 228 / 16%);
  --field-inset: inset 0 1px 2px rgb(9 30 66 / 7%);
  --wash-a: oklch(0.70 0.15 250 / 34%);
  --wash-b: oklch(0.76 0.13 195 / 30%);
  --wash-c: oklch(0.78 0.12 305 / 26%);

  /* Column colours. Saturated enough to tell six apart at a glance, never
     used behind text. */
  --c-green: #22a06b;
  --c-red: #e2483d;
  --c-blue: #1d7afc;
  --c-purple: #8f7ee7;
  --c-yellow: #cf9f02;
  --c-teal: #1d9aaa;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #1d2125;
    --foreground: #b6c2cf;
    --card: #22272b;
    --sunken: #161a1d;
    --primary: #579dff;
    --primary-foreground: #1d2125;
    --primary-hover: #85b8ff;
    --secondary: #282e33;
    --secondary-hover: #38414a;
    --muted-foreground: #9fadbc;
    --accent: #282e33;
    --selected: #1c2b41;
    --selected-text: #579dff;
    --destructive: #f87168;
    --border: #313a44;
    --ring: #579dff;
    --sidebar: #1d2125;

    --glass: rgb(34 39 43 / 68%);
    --glass-strong: rgb(34 39 43 / 90%);
    --glass-edge: inset 0 1px 0 rgb(255 255 255 / 8%);
    --glass-shadow: 0 8px 24px rgb(0 0 0 / 32%), 0 1px 3px rgb(0 0 0 / 24%);
    --pop-shadow: 0 12px 32px rgb(0 0 0 / 45%);
    --ring-halo: rgb(87 157 255 / 24%);
    --field-inset: inset 0 1px 2px rgb(0 0 0 / 26%);
    --wash-a: oklch(0.55 0.16 250 / 34%);
    --wash-b: oklch(0.50 0.13 195 / 28%);
    --wash-c: oklch(0.52 0.14 305 / 26%);

    --c-green: #2abb7f;
    --c-red: #f15b50;
    --c-blue: #4c9aff;
    --c-purple: #9f8fef;
    --c-yellow: #e2b203;
    --c-teal: #37b4c3;
  }
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; min-height: 100svh;
  background: var(--sunken); color: var(--foreground);
  background-image:
    radial-gradient(60rem 40rem at 12% -8%, var(--wash-a), transparent 60%),
    radial-gradient(50rem 34rem at 92% 4%, var(--wash-b), transparent 62%),
    radial-gradient(46rem 40rem at 62% 96%, var(--wash-c), transparent 60%);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter,
               "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

button, .btn {
  font: inherit; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 2rem; padding: 0 .75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--foreground); white-space: nowrap;
  box-shadow: var(--glass-edge);
  transition: background-color .1s ease, box-shadow .1s ease, border-color .1s ease;
}
button:hover, .btn:hover { background: var(--glass-strong); }
button:disabled { opacity: .5; cursor: not-allowed; }
button svg, .btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary {
  background: var(--primary); color: var(--primary-foreground);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 22%), 0 1px 2px rgb(9 30 66 / 18%);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-sm { height: 1.75rem; padding: 0 .5rem; font-size: 13px; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none;
             -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn-ghost:hover { background: var(--secondary); }
.btn-danger { background: var(--destructive); color: #fff; border-color: transparent; }
.btn-danger:hover { background: #ae2e24; }
@media (prefers-color-scheme: dark) {
  .btn-danger { color: #1d2125; }
  .btn-danger:hover { background: #fd9891; }
}
button:active, .btn:active { transform: translateY(.5px); }
button:focus-visible, a:focus-visible, summary:focus-visible,
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible {
  outline: 2px solid var(--ring); outline-offset: 1px;
}

.icon-button {
  height: 1.75rem; width: 1.75rem; padding: 0; display: inline-grid;
  place-items: center; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent;
  color: var(--muted-foreground);
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
}
.icon-button:hover { background: var(--secondary-hover); color: var(--foreground); }
.icon-button.danger:hover { color: var(--destructive); }

/* ------------------------------------------------------------ fields */
input[type=text], input[type=search], input[type=number], textarea, select {
  height: 2.5rem; padding: 0 .875rem; font: inherit;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--field-inset);
  color: inherit; min-width: 0;
  transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}
textarea { height: auto; padding: .5rem .625rem; resize: vertical; line-height: 1.45; }
select { padding-inline-end: 2rem; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626f86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .625rem center;
  background-size: 14px; }
::placeholder { color: var(--muted-foreground); }
input[type=text]:hover, input[type=search]:hover, input[type=number]:hover,
textarea:hover, select:hover { border-color: var(--muted-foreground); }
input[type=text]:focus, input[type=search]:focus, input[type=number]:focus,
textarea:focus, select:focus {
  background-color: var(--card); border-color: var(--primary); outline: none;
  box-shadow: var(--field-inset), 0 0 0 3px var(--ring-halo);
}
input[type=checkbox], input[type=radio] {
  accent-color: var(--primary); width: 1.125rem; height: 1.125rem; margin: 0;
  cursor: pointer; flex: none;
}
.check { display: flex; align-items: center; gap: .625rem; cursor: pointer;
         user-select: none; }

/* ------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 15rem 1fr; min-height: 100svh; }
.sidebar {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-inline-end: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .25rem; padding: .5rem;
  position: sticky; top: 0; height: 100svh;
}
.brand { display: flex; align-items: center; gap: .625rem;
         padding: .625rem .5rem; margin-bottom: .5rem; }
.brand-mark {
  width: 2rem; height: 2rem; flex: none; display: block;
  background: url("/favicon.svg") center / contain no-repeat;
  font-size: 0; color: transparent;
}
.brand-name { display: block; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
/* The product's name, and nothing else — the interface stays in Inter, and a
   person's own name in the sidebar is not a logo. */
.wordmark { font-family: "Space Grotesk", Inter, -apple-system, system-ui, sans-serif;
            font-weight: 700; font-size: 15.5px; letter-spacing: -.015em; }
.brand-sub { display: block; color: var(--muted-foreground); font-size: 12px; line-height: 1.2; }
.nav-label { color: var(--muted-foreground); font-size: 12px; font-weight: 500;
             padding: .75rem .5rem .375rem; }
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  height: 2.25rem; padding: 0 .5rem; border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
}
.nav-item:hover { background: var(--secondary-hover); }
.nav-item[aria-current="page"] { background: var(--selected); color: var(--selected-text); }
.nav-item svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.sidebar-foot { margin-top: auto; }
.user-card { display: flex; align-items: center; gap: .625rem; padding: .5rem; }
.avatar {
  width: 2rem; height: 2rem; flex: none; border-radius: 50%;
  background: var(--secondary); color: var(--foreground);
  display: grid; place-items: center; font-weight: 600; font-size: 12px;
  object-fit: cover; overflow: hidden;
}
.user-mail { font-size: 12px; color: var(--muted-foreground);
             overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
header.topbar {
  position: sticky; top: 0; z-index: 10;
  height: 3rem; display: flex; align-items: center; gap: 1rem;
  padding: 0 1.5rem; border-bottom: 1px solid var(--border);
  background: var(--glass-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.topbar h1 { font-size: 14px; font-weight: 600; margin: 0; }
.spacer { flex: 1; }
main.content { padding: 1.5rem 1.75rem; max-width: 74rem; margin-inline: auto; }
.page-head { margin-bottom: 1.125rem; }
.page-head h2 { margin: 0 0 .25rem; font-size: 21px; font-weight: 600;
                letter-spacing: -.019em; line-height: 1.2; }
.page-head p { margin: 0; color: var(--muted-foreground); }

/* ------------------------------------------------------- components */
.card {
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-edge), var(--glass-shadow);
}
.toolbar { display: flex; gap: .5rem; margin-bottom: .875rem; flex-wrap: wrap; }
.toolbar button, .toolbar .btn { height: 2.5rem; padding: 0 1rem; border-radius: 8px; }
.toolbar input[type=text] { flex: 1 1 16rem; }
.muted { color: var(--muted-foreground); }
.nums { font-variant-numeric: tabular-nums; white-space: nowrap; }
.problem { color: var(--destructive); margin: 0 0 1rem; }
.badge {
  display: inline-flex; align-items: center; height: 1.375rem;
  padding: 0 .5rem; border-radius: 980px;
  font-size: 12px; font-weight: 500;
  background: var(--secondary); color: var(--muted-foreground);
}
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted-foreground); }
.empty strong { display: block; color: var(--foreground); font-size: 15px;
                margin-bottom: .25rem; }

/* --------------------------------------------------------------- tiles */
.tiles { display: grid; gap: .875rem;
         grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.tile {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.125rem;
  box-shadow: var(--glass-edge), var(--glass-shadow);
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.tile:hover { border-color: var(--primary); transform: translateY(-1px);
              box-shadow: var(--glass-edge), 0 12px 28px rgb(9 30 66 / 12%); }
.tile-link::after { content: ""; position: absolute; inset: 0; }
.tile-icon {
  width: 2rem; height: 2rem; flex: none; display: grid; place-items: center;
  border-radius: var(--radius); margin-bottom: .75rem;
  background: var(--selected); color: var(--selected-text);
}
.tile-icon svg { width: 17px; height: 17px; }
.tile-name { font-weight: 600; letter-spacing: -.01em;
             overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-count { margin-top: auto; padding-top: .75rem; color: var(--muted-foreground);
              font-size: 13px; display: flex; align-items: center; gap: .5rem; }
.tile-count form { margin-inline-start: auto; position: relative; z-index: 1; }

/* ------------------------------------------------------------- google */
/* Google's own specification for the sign-in button. The one control on the
   site that is not ours to restyle. */
.btn-google {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 12px; height: 40px; padding: 0 12px; border-radius: 4px;
  border: 1px solid #747775; background: #fff; color: #1f1f1f;
  font-family: Roboto, Inter, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: .25px;
  transition: box-shadow .15s ease, background-color .15s ease;
}
.btn-google:hover { background: #f7f8f8;
  box-shadow: 0 1px 2px rgb(60 64 67 / 30%), 0 1px 3px 1px rgb(60 64 67 / 15%); }
.btn-google svg { width: 18px; height: 18px; flex: none; }
@media (prefers-color-scheme: dark) {
  .btn-google { background: #131314; border-color: #8e918f; color: #e3e3e3; }
  .btn-google:hover { background: #1e1f20; }
}

/* ------------------------------------------------------------- tooltip */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--foreground); color: var(--background);
  padding: .3rem .55rem; border-radius: var(--radius);
  font-size: 12px; font-weight: 500; line-height: 1.4;
  white-space: normal; width: max-content; max-width: 16rem; text-align: start;
  opacity: 0; pointer-events: none; z-index: 60;
  transition: opacity .12s ease .25s;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; }
[data-tip-end]::after { left: auto; right: 0; transform: none; }

/* ------------------------------------------------------------ waiting */
@keyframes spin { to { transform: rotate(1turn); } }
.spinner { width: 14px; height: 14px; flex: none; border-radius: 50%;
           border: 2px solid currentColor; border-top-color: transparent;
           animation: spin .6s linear infinite; }
[data-busy] { pointer-events: none; opacity: .8; }

/* ------------------------------------------------------------- centred */
.centre { min-height: 100svh; display: grid; place-items: center; padding: 1.5rem; }
.centre > .card { width: 100%; max-width: 25rem; padding: 2.25rem 2rem; }
.centre h2 { margin: 0 0 .375rem; font-size: 20px; letter-spacing: -.02em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  body { background-image: none; }
  .card, .tile, .sidebar, header.topbar, button, .btn {
    background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center;
             overflow-x: auto; border-inline-end: 0; border-bottom: 1px solid var(--border); }
  .brand { margin: 0; } .nav-label, .sidebar-foot .user-mail { display: none; }
  .sidebar-foot { margin-inline-start: auto; margin-top: 0; display: flex; }
  main.content { padding: 1.25rem 1rem; }
}

/* ------------------------------------------------------- site footer */
.foot-brand { display: inline-flex; align-items: center; gap: .5rem; }
.foot-brand .brand-mark { width: 1.75rem; height: 1.75rem; }
.site-foot { margin-top: 4rem; border-top: 1px solid var(--border); padding: 1.5rem 0 2.5rem; }
.site-foot-inner { display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; }
.foot-links { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.foot-links a { color: var(--muted-foreground); font-size: 13.5px; }
.foot-links a:hover { color: var(--foreground); }
.foot-note { font-size: 13px; margin-inline-start: auto; }
@media (max-width: 640px) {
  .site-foot-inner { gap: .75rem; }
  .foot-note { margin-inline-start: 0; width: 100%; }
}
