/* The public apps page. One accent (Kasko red), neutral surfaces, light + dark. */

:root {
  color-scheme: light dark;
  --bg: #f2f3f5;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, .09);
  --fill: #e9e9ee;
  --own: #ffffff;
  --slate: #464957;
  --red: #c21d28;
  --red-hover: #a8161f;
  --focus: rgba(194, 29, 40, .35);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: rgba(255, 255, 255, .1);
    --fill: #2c2c2f;
    --own: #0d0d0f;
    --slate: #e3e2e6;
    --red-hover: #d83a44;
    --focus: rgba(232, 80, 90, .5);
  }
}

* { 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, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.brand svg { width: 22px; height: 27px; }
.lang { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--muted); }

main { max-width: 640px; margin: 0 auto; padding: 8px 16px 48px; }
h1 { margin: 0; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.01em; }
.app h1 { font-size: 1.375rem; }
h2 { margin: 24px 0 8px; font-size: 1rem; }
.card > h2:first-child { margin-top: 0; }
.sub { margin: 4px 0 0; color: var(--muted); }

.card { margin-top: 16px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }

/* The cards, one column. 380px keeps the details on one line. */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); margin-top: 16px; }
.item { margin-top: 0; padding: 16px; }
.title { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 56px; }
.desc { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.meta .tag { align-self: flex-start; margin-top: 4px; padding: 2px 8px; background: var(--fill); border-radius: 6px; font-size: .8125rem; }
.meta { display: flex; flex-direction: column; min-width: 0; }
.meta strong { font-weight: 600; overflow-wrap: break-word; }
.meta small { color: var(--muted); font-size: .875rem; }

.plate { flex: none; width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--fill); }
.letter { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 1.25rem; font-weight: 600; }
.own { display: flex; align-items: center; justify-content: center; background: var(--own); border: 1px solid var(--line); }
.own svg { width: 32px; height: 39px; }
.slate { fill: var(--slate); }
.red { fill: var(--red); }

.head { display: flex; align-items: center; gap: 14px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 20px;
  padding: 12px 20px;
  background: var(--red);
  color: #fff;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
}
.btn:hover { background: var(--red-hover); }
.btn.small { flex: none; min-height: 44px; margin-top: 0; padding: 8px 16px; }
/* Phones: the button gets its own row, so the name and details keep theirs. */
@media (max-width: 440px) {
  .item .head { flex-wrap: wrap; }
  .btn.small { flex: 1 0 100%; }
}
.note { margin: 16px 0 0; }
.text { margin: 16px 0 0; white-space: normal; overflow-wrap: anywhere; }
h2 + .text { margin-top: 0; }
ol { margin: 0; padding-inline-start: 20px; }
li + li { margin-top: 6px; }
.back { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.back::before { content: "‹"; margin-inline-end: 6px; font-size: 1.25rem; line-height: 1; }
[dir="rtl"] .back::before { content: "›"; }
.foot { margin: 16px 4px 0; color: var(--muted); font-size: .875rem; }
