:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #15171c;
  --muted: #6b7280;
  --line: #e4e6eb;
  --soft: #eef0f4;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --radius: 14px;
  --ctl: 36px; /* the height of every control in a row: tabs, buttons, selects */
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --card: #171a21;
    --text: #e8eaef;
    --muted: #8b93a3;
    --line: #262a33;
    --soft: #1f232c;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  min-height: 100dvh; display: flex; flex-direction: column;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.top, main, .way { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 24px; }
main { flex: 1; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 34px; padding-bottom: 18px; }
/* Over the title: the way back to the app's website, and whom to write to. */
.way { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding-top: 22px;
  color: var(--muted); font-size: 14px; }
.way .home { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; margin-left: -4px;
  border-radius: 15px; background: var(--soft); color: var(--muted); font-weight: 500; text-decoration: none; }
.way .home:hover { color: var(--text); }
.way svg { width: 7px; height: 12px; }
.way .contact { margin-left: auto; }
.way:not([hidden]) + .top { padding-top: 26px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand > span { display: flex; flex-direction: column; min-width: 0; }
.title { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.title, .tagline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tagline { color: var(--muted); font-size: 15px; line-height: 1.4; margin-top: 2px; }
.account { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0; background: var(--bg); }
.segmented { display: inline-flex; align-items: center; height: var(--ctl); min-width: 0; background: var(--soft); border-radius: 10px;
  padding: 3px; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 100%; border: 0; background: none;
  padding: 0 13px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 500; line-height: 1; white-space: nowrap; }
.segmented button[aria-selected="true"], .segmented button[aria-pressed="true"] { background: var(--card); color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented.wide { display: flex; }
.segmented.wide button { flex: 1; }
.count { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent);
  color: #fff; font-size: 12px; font-weight: 600; line-height: 18px; text-align: center; }

/* Every button is one height with its words in the middle, so a row of them (and of tabs and selects) lines up. */
button.primary, .button.primary, button.plain, .button.plain { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--ctl); flex-shrink: 0; border: 0; border-radius: 10px; padding: 0 14px; line-height: 1; white-space: nowrap; cursor: pointer;
  text-decoration: none; }
button.primary, .button.primary { background: var(--accent); color: #fff; font-weight: 600; }
button.plain, .button.plain { background: var(--soft); font-weight: 500; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.new svg, .sort svg { width: 12px; height: 12px; flex: none; }
.tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sort { color: var(--muted); }

.entries { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.entry { display: flex; gap: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); }
.entry.pending { border-style: dashed; }
/* For, the count, against: one column, the arrow of one's own vote lit. */
.vote { flex: 0 0 44px; align-self: flex-start; display: flex; flex-direction: column; align-items: stretch; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; }
.vote button { display: grid; place-items: center; height: 30px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
.vote button:hover:not(:disabled) { background: var(--soft); color: var(--text); }
.vote button:disabled { opacity: .45; cursor: default; }
.vote svg { width: 12px; height: 12px; display: block; }
.vote .n { text-align: center; font-weight: 700; line-height: 20px; font-variant-numeric: tabular-nums; }
.vote.for { border-color: var(--accent); }
.vote.for .up, .vote.for .n { color: var(--accent); }
.vote.against { border-color: #e5484d; }
.vote.against .down, .vote.against .n { color: #e5484d; }
.body { flex: 1; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 20px; margin-bottom: 8px; font-size: 13px;
  line-height: 20px; color: var(--muted); }
.kind { font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.kind.feature { color: var(--accent); }
.kind.issue { color: #e5484d; }
.pill { border-radius: 999px; padding: 0 9px; font-weight: 600; font-size: 12px; line-height: 20px; white-space: nowrap; background: var(--soft); color: var(--muted); }
.pill.s-confirmed { background: #e0ecff; color: #1d5fd6; }
.pill.s-in-progress { background: #efe6ff; color: #6d3fd0; }
.pill.s-completed, .pill.s-fixed { background: #ddf5e5; color: #18794e; }
.pill.s-declined { background: #fde8e8; color: #b42318; }
.pill.awaiting { background: #fff6d6; color: #8a6100; }
@media (prefers-color-scheme: dark) {
  .pill.s-confirmed { background: #16284a; color: #8ab4ff; }
  .pill.s-in-progress { background: #2a1d4a; color: #b89cff; }
  .pill.s-completed, .pill.s-fixed { background: #10301f; color: #5fd49a; }
  .pill.s-declined { background: #3a1414; color: #ff8a80; }
  .pill.awaiting { background: #33290d; color: #e6c35c; }
}
.entry h3 { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; }
.entry p.text { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); opacity: .86; }
.entry.clamped p.text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shot { display: block; margin-top: 14px; max-width: min(100%, 360px); }
.shot img { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); }
.entry.full .shot { max-width: 100%; }
.entry.full .shot img { max-height: none; }
/* The admin's row under a post: smaller than the page's controls, all one height, Delete apart at the end. */
.admin { --ctl: 30px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line); font-size: 13.5px; }
.admin button { border-radius: 8px; padding: 0 11px; }
.admin select { height: var(--ctl); appearance: none; -webkit-appearance: none; border: 0; border-radius: 8px; padding: 0 28px 0 11px;
  font-weight: 500; line-height: 1; cursor: pointer;
  background: var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b93a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center / 10px 6px; }
.admin .danger { margin-left: auto; }
.admin .danger, .menu-list .danger { color: #e5484d; }
.editor { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.editor input, .editor textarea { width: 100%; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; resize: vertical; }
.editor .actions { margin-top: 0; }

/* The comments under a post, on its page; one of them alone in the review queue. */
.meta .talk { color: inherit; text-decoration: none; }
.meta .talk::before { content: "· "; }
.meta .talk:hover { color: var(--text); }
.comments { margin-top: 8px; }
.comments h4 { margin: 0 4px 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.comment { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.comment.pending { border-style: dashed; }
.comment.pinned { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.comment .meta { margin-bottom: 6px; }
.comment p.text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .under { margin-bottom: 8px; font-size: 13.5px; color: var(--muted); }
.comment .under a { color: var(--text); font-weight: 600; text-decoration: none; }
.comment .under a:hover { text-decoration: underline; }
.pill.dev { background: var(--accent); color: #fff; }
.pill.pin { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.write { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.write textarea { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical; }
.write > button { align-self: flex-start; }

.more { padding: 28px 0 56px; text-align: center; color: var(--muted); }
.contact a, .hint a { color: var(--accent); text-decoration: none; }
.contact a:hover, .hint a:hover { text-decoration: underline; }
.back { display: inline-block; margin: 4px 0 12px; color: var(--muted); text-decoration: none; }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; }

dialog.sheet { border: 0; border-radius: 18px; padding: 22px; width: min(520px, calc(100vw - 24px)); background: var(--card);
  color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog.sheet::backdrop { background: rgba(10, 12, 16, .45); }
dialog h2 { margin: 0; font-size: 19px; line-height: 1.3; }
dialog form, .signin { display: flex; flex-direction: column; gap: 14px; }
dialog label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13.5px; }
dialog input:not([type=file]), dialog textarea { font-weight: 400; font-size: 15px; background: var(--soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 11px; width: 100%; resize: vertical; }
dialog p { margin: 0; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.actions.column { flex-direction: column; align-items: stretch; }
.actions.column > .plain { height: 44px; }
.attach { display: flex; flex-direction: column; gap: 8px; }
.file { flex-direction: row !important; align-items: center; cursor: pointer; color: var(--accent); font-weight: 500 !important; }
.file input { display: none; }
.attach figure { margin: 0; display: flex; align-items: flex-end; gap: 10px; }
.attach figure img { max-width: 160px; max-height: 120px; border-radius: 8px; border: 1px solid var(--line); }
.hint { color: var(--muted); font-size: 13px; }
.error { color: #e5484d; font-size: 13.5px; }
/* Sign in with Apple, as Apple's guidelines draw it: black (white in dark mode), its logo and words in the middle */
.apple { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border-radius: 10px;
  background: #000; color: #fff; font-weight: 600; font-size: 16px; text-decoration: none; }
.apple svg { width: 15px; height: 18px; margin-top: -3px; }
@media (prefers-color-scheme: dark) { .apple { background: #fff; color: #000; } }
.dev { display: flex; gap: 8px; }
.dev button { flex: 1; min-width: 0; padding: 0 8px; font-size: 13px; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + 6px); background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; min-width: 190px; box-shadow: 0 10px 30px rgba(0,0,0,.15); z-index: 20;
  display: flex; flex-direction: column; }
.menu-list button { background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.menu-list button:hover { background: var(--soft); }
.menu-list .note { padding: 6px 10px; color: var(--muted); font-size: 12.5px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #15171c; color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 50; max-width: calc(100vw - 32px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25); }

@media (max-width: 520px) {
  .top, main, .way { padding-left: 16px; padding-right: 16px; }
  .top { padding-top: 22px; padding-bottom: 12px; }
  .way:not([hidden]) + .top { padding-top: 18px; }
  .title { font-size: 22px; }
  .entries { gap: 12px; }
  .entry { gap: 14px; padding: 16px; }
  .entry h3 { font-size: 17px; }
  .vote { flex-basis: 40px; }
  .segmented button { padding: 0 11px; }
  /* With the admin's Review tab there is no room for the word: the plus alone, the tabs scrolling beside it if they must. */
  .bar.crowded .new { width: var(--ctl); padding: 0; }
  .bar.crowded .new .label { display: none; }
  .tools { gap: 6px; }
  .sort { padding: 0 10px; }
  .bar.crowded .sort span { display: none; }
  .comment { padding: 14px 16px; }
}

/* "Report", at the end of a post's line of facts: there for whoever needs it, out of the way of everyone else. */
.meta .report { margin-left: auto; background: none; border: 0; padding: 0; font: inherit; color: var(--muted); opacity: .7; cursor: pointer; }
.meta .report:hover:not(:disabled) { opacity: 1; text-decoration: underline; }
.meta .report:disabled { cursor: default; }
