/* A public registry, not a landing page: ruled sheet, one ink colour, one accent.
   Brand: navy #07315F ink, sky #3BC1EE for focus and progress, coral #EB4E4D only for errors. */
@font-face { font-family: Beiruti; src: url(fonts/beiruti-arabic.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; font-display: swap; }
@font-face { font-family: Beiruti; src: url(fonts/beiruti-latin.woff2) format("woff2"); unicode-range: U+0000-00FF; font-display: swap; }
@font-face { font-family: Hanken; src: url(fonts/hanken-latin.woff2) format("woff2"); font-display: swap; }

:root {
  --ink: #07315F; --ink-2: #4a5d73; --paper: #fbfaf7; --sheet: #fff; --rule: #e3e1da;
  --sky: #3BC1EE; --coral: #EB4E4D; --ok: #1f7a4d;
  --r: 6px; --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px;
  --t-sm: 0.875rem; --t-md: 1rem; --t-lg: 1.375rem; --t-xl: 2rem;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--t-md)/1.65 Beiruti, Hanken, system-ui, sans-serif; }
[lang="en"], [dir="ltr"] input { font-family: Hanken, Beiruti, system-ui, sans-serif; }
.mono, input.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.02em; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: #0a4a8f; }

.bar { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); background: var(--sheet); }
.bar img { display: block; }
.bar-title { font-weight: 600; color: var(--ink-2); border-inline-start: 1px solid var(--rule); padding-inline-start: var(--s3); }
main { max-width: 880px; margin: 0 auto; padding: var(--s4) 16px var(--s5); }
.foot { max-width: 880px; margin: 0 auto; padding: var(--s3) 16px var(--s5); font-size: var(--t-sm); color: var(--ink-2); }

h1 { font-size: var(--t-xl); line-height: 1.2; margin: 0 0 var(--s2); font-weight: 700; }
h2 { font-size: var(--t-lg); margin: var(--s4) 0 var(--s2); }
.lede { padding: var(--s3) 0 var(--s4); max-width: 60ch; }
.lede p { margin: var(--s2) 0; }
.muted { color: var(--ink-2); }
small { display: block; color: var(--ink-2); font-size: var(--t-sm); }

.sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); padding: var(--s4); }
.narrow-sheet { max-width: 420px; margin: var(--s5) auto; }
fieldset { border: 0; margin: 0; padding: var(--s4) 0; min-width: 0; }
fieldset + fieldset { box-shadow: inset 0 1px 0 var(--rule); }
fieldset:first-of-type { padding-top: 0; }
legend { font-weight: 700; font-size: var(--t-lg); padding: 0; margin-bottom: var(--s2); float: inline-start; width: 100%; display: flex; align-items: center; gap: var(--s2); }
legend + * { clear: both; }
legend .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1.5px solid var(--ink); border-radius: 50%; font-size: var(--t-sm); font-family: Hanken, sans-serif; }

.field { display: block; margin-bottom: var(--s3); font-weight: 600; }
.field input, .field select, .field textarea {
  display: block; width: 100%; margin-top: var(--s1); padding: 10px 12px; min-height: 44px;
  font: inherit; font-weight: 400; color: var(--ink); background: #fff;
  border: 1px solid #c9cdd3; border-radius: var(--r);
}
.field input:focus, .field select:focus, .field textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--sky); outline-offset: 1px; }
input[type=file] { padding: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s3); }
.grid3 { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 0 var(--s3); }
.acct { display: grid; grid-template-columns: 1.4fr 0.5fr 1fr 1.6fr; gap: 0 var(--s2); padding: var(--s2) 0; border-bottom: 1px dashed var(--rule); }
.acct:last-child { border-bottom: 0; }
.acct .field { margin-bottom: var(--s2); }
.acct-note { grid-column: 1 / -1; font-size: var(--t-sm); color: var(--ink-2); min-height: 1em; }
.acct-note.warn, .warn { color: #8a5a00; }
.consent label { display: flex; gap: var(--s2); align-items: flex-start; }
.consent input { width: 20px; height: 20px; margin-top: 4px; flex: none; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

button { font: inherit; font-weight: 700; min-height: 44px; padding: 10px 22px; border-radius: var(--r); cursor: pointer; border: 1px solid var(--ink); }
button.primary, .primary-link { background: var(--ink); color: #fff; text-decoration: none; display: inline-block; padding: 10px 22px; border-radius: var(--r); }
button.ghost { background: transparent; color: var(--ink); }
button.danger { background: #fff; color: #b3261e; border-color: #b3261e; }
button.link { background: none; border: 0; padding: 0; min-height: auto; color: var(--ink); text-decoration: underline; font-weight: 400; }
.actions { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s3); }

.errors { color: #b3261e; border-inline-start: 3px solid var(--coral); padding-inline-start: var(--s3); }
.notice { border-inline-start: 3px solid var(--ok); padding-inline-start: var(--s3); color: var(--ok); }

/* Logo editor: the canvas draws the app's circle and safe area itself. */
.editor { display: grid; grid-template-columns: 256px 1fr; gap: var(--s4); align-items: start; margin-top: var(--s2); }
#stage { width: 256px; height: 256px; border-radius: var(--r); background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px; touch-action: none; cursor: grab; }
.editor-tools label { display: block; margin-bottom: var(--s2); }
.editor-tools input[type=range] { width: 100%; }
.preview-row, .row-preview { display: flex; gap: var(--s2); align-items: center; padding: var(--s2) var(--s3); border: 1px solid var(--rule); border-radius: var(--r); background: #fff; max-width: 320px; }
.preview-row img, .disc { border-radius: 50%; border: 1px solid #d9dde3; background: #fff; flex: none; }
.preview-row div, .row-preview div { display: flex; flex-direction: column; line-height: 1.3; }
.preview-row span, .row-preview span { font-size: var(--t-sm); color: var(--ink-2); }

.done { text-align: center; }
.done-logo { border-radius: 50%; border: 1px solid #d9dde3; margin: var(--s3) auto 0; display: block; }

.prose { max-width: 720px; }
.rules { border-collapse: collapse; width: 100%; }
.rules th { text-align: start; vertical-align: top; padding: var(--s2) 0 var(--s2) var(--s3); white-space: nowrap; width: 1%; }
.rules td, .rules th { border-top: 1px solid var(--rule); padding-block: var(--s2); }
.examples { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.examples figure { margin: 0; text-align: center; font-size: var(--t-sm); }
.examples figcaption { margin-top: var(--s1); }
.examples .ok figcaption::before { content: "✓ "; color: var(--ok); font-weight: 700; }
.examples .bad figcaption::before { content: "✕ "; color: #b3261e; font-weight: 700; }

.admin-nav { display: flex; gap: var(--s3); align-items: center; margin-bottom: var(--s3); }
.admin-nav .who { margin-inline-start: auto; color: var(--ink-2); font-size: var(--t-sm); }
.tabs { display: flex; gap: var(--s3); align-items: center; border-bottom: 1px solid var(--rule); margin-bottom: var(--s3); flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: var(--s2) 0; border-bottom: 2px solid transparent; }
.tabs a.on { border-color: var(--ink); font-weight: 700; }
.tabs .count { font-family: Hanken, sans-serif; font-size: var(--t-sm); color: var(--ink-2); }
.tabs .search { margin-inline-start: auto; }
.tabs .search input { padding: 6px 10px; border: 1px solid #c9cdd3; border-radius: var(--r); font: inherit; }
.list { width: 100%; border-collapse: collapse; }
.list th { text-align: start; font-size: var(--t-sm); color: var(--ink-2); font-weight: 600; }
.list td, .list th { padding: var(--s2); border-bottom: 1px solid var(--rule); vertical-align: middle; }
.review-head { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; margin-bottom: var(--s3); }
.review-head .row-preview { margin-inline-start: auto; }

@media (max-width: 640px) {
  .grid2, .grid3, .editor { grid-template-columns: 1fr; }
  .acct { grid-template-columns: 1fr 1fr; }
  .acct .wide, .acct .field:nth-child(3) { grid-column: 1 / -1; }
  .examples { grid-template-columns: repeat(2, 1fr); }
  .sheet { padding: var(--s3); }
  h1 { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.invite { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s3); align-items: end; margin: var(--s3) 0 var(--s4); }
.invite .field { margin: 0; }
.check { display: flex; gap: var(--s2); align-items: center; min-height: 44px; }
.row-actions { display: flex; gap: var(--s3); flex-wrap: wrap; }
@media (max-width: 640px) { .invite { grid-template-columns: 1fr; } }
