/* Organization portal (/org). Builds on connect.css (tokens, buttons, cards, fields). */

:root {
  /* Fixed-beacon accent: the brand amber (design system --accent-amber), the square border
     the apps draw around organizations' beacons. */
  --place: oklch(0.82 0.13 75);
  --place-soft: oklch(0.95 0.05 80);
  --place-ink: oklch(0.45 0.13 75);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --place: oklch(0.80 0.13 75);
    --place-soft: oklch(0.32 0.06 75);
    --place-ink: oklch(0.86 0.13 75);
  }
}
[data-theme="dark"] {
  --place: oklch(0.80 0.13 75);
  --place-soft: oklch(0.32 0.06 75);
  --place-ink: oklch(0.86 0.13 75);
}

body.org { min-height: 100vh; }

.org-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.org-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.org-brand .logo { margin: 0; }
.org-nav { display: flex; align-items: center; gap: 18px; font-size: var(--fs-sm); }
.org-nav a { color: var(--ink-2); text-decoration: none; }
.org-nav a[aria-current="page"] { color: var(--primary-ink); font-weight: 600; }
/* The portal's language menu, like the website's (socialize.css .lang-switcher): the
   current language's flag and name, opening a list of the others. */
.org-lang-menu { position: relative; margin-left: auto; }
.org-lang-menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  padding: 6px 12px;
  border-radius: 6px;
  user-select: none;
}
.org-lang-menu summary::-webkit-details-marker { display: none; }
.org-lang-menu summary:hover, .org-lang-menu[open] summary { color: var(--ink); border-color: var(--ink-3); }
.org-lang-menu summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lang-chevron { width: 12px; height: 12px; transition: transform 0.15s ease; }
.org-lang-menu[open] .lang-chevron { transform: rotate(180deg); }
.lang-flag { width: 24px; height: auto; aspect-ratio: 3 / 2; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); flex-shrink: 0; display: block; }
.org-lang-menu .lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 192px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  z-index: 200;
}
.org-lang-menu .lang-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.org-lang-menu .lang-menu a:hover, .org-lang-menu .lang-menu a:focus-visible { background: var(--surface-2); outline: none; }
.org-lang-menu .lang-menu a[aria-current="page"] { font-weight: 600; }
.org-lang-menu .lang-menu a[aria-current="page"]::after { content: "✓"; margin-left: auto; color: var(--primary); }
@media (max-width: 560px) { .org-lang-menu .lang-name { display: none; } }

.link-btn {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--ink-2);
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

.org-main {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}
.org-section > .h1 { margin-bottom: 18px; }

.org-card {
  max-width: none;
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin: 0 0 18px;
}
.org-signin { max-width: 460px; margin: 40px auto; padding: 36px 28px; }

.h2 {
  font-size: var(--fs-lg);
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}
.org-card .caption { margin: 0 0 12px; }
.muted { color: var(--ink-3); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.section-head .h1 { margin: 0; }
.back-link { display: inline-block; margin: 0 0 12px; font-size: var(--fs-sm); text-decoration: none; }

.btn-small { padding: 8px 14px; font-size: var(--fs-sm); }
/* connect.css colors every a:hover; buttons that are links keep their own text color. */
a.btn-primary, a.btn-primary:hover { color: var(--ink-on-primary); }
a.btn-secondary, a.btn-secondary:hover { color: var(--ink); }
.btn-danger { background: var(--danger); color: var(--ink-on-primary); }
.btn-danger:hover:not(:disabled) { filter: brightness(0.92); }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.error {
  color: var(--danger);
  font-size: var(--fs-sm);
  margin: 0 0 12px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}

/* Fields: connect.css styles .field inputs; make selects/textareas match. */
.org select, .org textarea, .org input[type="time"], .org input[type="datetime-local"], .org input[type="text"], .org input[type="search"],
.org input[type="tel"], .org input[type="url"] {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  max-width: 100%;
}
.org textarea { width: 100%; min-height: 72px; resize: vertical; }
.org .field { display: block; margin: 0 0 14px; }
.org .field input, .org .field textarea, .org .field select { width: 100%; }
.org .field-label { display: block; margin-bottom: 6px; }

/* Language rows ("add a row" editors) */
.lang-rows { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.lang-row {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px;
  background: var(--surface-2);
}
.lang-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
/* The Remove text button sits at the right, like "Remove schedule". */
.lang-row-head .link-btn { margin-left: auto; }
.lang-row-head select { min-width: 180px; }
.lang-tag {
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: 4px 10px;
  border-radius: var(--r-full);
  background: var(--place-soft);
  color: var(--ink);
}
.row-status { display: block; margin-top: 8px; font-size: var(--fs-xs); color: var(--ink-3); }
.row-status:empty { display: none; }
.row-status.ok { color: var(--place-ink); }
.row-status.bad { color: var(--danger); }
.add-row { align-self: flex-start; }

/* Photos */
.photo-pick { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; flex-wrap: wrap; }
.photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 12px; /* square-ish, like the map marker */
  border: 2px solid var(--place);
  object-fit: cover;
  background: var(--surface-3);
}
.photo-preview.empty { border-style: dashed; display: flex; align-items: center; justify-content: center; }
.photo-preview[hidden] { display: none; }
.photo-drop-hint { font-size: var(--fs-xs); color: var(--ink-3); text-align: center; line-height: 1.2; padding: 4px; }
/* The square takes a dropped photo or opens the file chooser. */
.photo-drop { position: relative; border-radius: 12px; cursor: pointer; line-height: 0; }
/* Removes the photo: a small × over its top-right corner. */
.photo-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.photo-remove:hover { color: var(--ink); }
.photo-remove[hidden] { display: none; }
.photo-drop:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.photo-drop.dragover .photo-preview { outline: 3px dashed var(--place); outline-offset: 3px; }
/* The organization's photo shown in place of a beacon photo of its own. */
.photo-preview.inherited { opacity: 0.55; border-style: dashed; }

/* Interests */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; }
.chip {
  appearance: none;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
}
.chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--ink); }
.chip .x { margin-left: 6px; opacity: 0.6; }

/* Address search */
.address-search { display: flex; gap: 8px; margin: 0 0 8px; }
.address-search input { flex: 1; min-width: 0; }
.address-results {
  list-style: none;
  margin: 0 0 10px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
}
.address-result {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--r-sm);
  padding: 9px 10px;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--ink);
  cursor: pointer;
}
.address-result:hover, .address-result:focus-visible { background: var(--surface-2); }
.address-message { padding: 8px 10px; font-size: var(--fs-xs); color: var(--ink-3); }

/* Map */
.map {
  height: 360px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  margin: 0 0 10px;
  z-index: 0;
}
.place-pin {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 3px solid var(--place);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

/* Hours: schedules of weekdays with time ranges */
.schedules { display: flex; flex-direction: column; gap: 12px; margin: 0 0 12px; }
.schedule {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.schedule-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-boxes { display: flex; flex-wrap: wrap; gap: 6px; }
/* Same look as the connect.css `.pill` choices (Send now / Schedule). */
.day-box {
  appearance: none;
  min-width: 52px;
  padding: 10px 0;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
}
/* The thicker border takes a pixel of padding so the box doesn't grow. */
.day-box.on { border: 2px solid var(--primary); padding: 9px 0; background: var(--primary-soft); color: var(--ink); font-weight: 600; }
.day-box:disabled { opacity: 0.35; cursor: not-allowed; }
.check.hours-holiday { margin: 18px 0 0; }

.hours-ranges { display: flex; flex-direction: column; gap: 6px; }
.hours-ranges > .btn, .schedules + .btn { align-self: flex-start; }
.hours-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hours-tz { margin: 0 0 12px; }

/* Lists */
.beacon-list, .push-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.beacon-item, .push-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px;
}
.beacon-item .photo-preview { width: 52px; height: 52px; border-radius: 10px; }
.beacon-item-main, .push-item-main { flex: 1; min-width: 0; }
.beacon-item-name { font-weight: 600; color: var(--ink); text-decoration: none; }
.beacon-item-meta, .push-item-meta { font-size: var(--fs-xs); color: var(--ink-3); }
.status-pill {
  font-size: var(--fs-xs);
  font-weight: 600;
  border-radius: var(--r-full);
  padding: 3px 9px;
  background: var(--surface-3);
  color: var(--ink-2);
  white-space: nowrap;
}
.status-pill.sent { background: var(--place-soft); color: var(--ink); }
.status-pill.scheduled { background: var(--primary-soft); color: var(--ink); }

.when { border: none; padding: 0; margin: 14px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.danger-zone { border-color: var(--danger); }

@media (max-width: 560px) {
  .org-card { padding: 18px; }
}

.sub-head { margin-top: 28px; margin-bottom: 6px; }
.caption.warning { color: var(--place-ink); }

/* Map: this place's pin (amber square, draggable) vs the organization's other places. */
.place-pin { cursor: grab; background: #fff; }
/* The brand coral (light-theme --primary) with a white ring, fixed in both themes because
   the map tiles are always light. */
.place-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: oklch(0.70 0.16 35);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.35);
}
.map-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; padding: 0; font-size: var(--fs-xs); color: var(--ink-3); }
.map-legend li { display: inline-flex; align-items: center; gap: 6px; }
.map-legend .place-dot { display: inline-block; }
.legend-pin { display: inline-block; width: 16px; height: 16px; border-width: 2px; border-radius: 5px; box-shadow: none; cursor: default; }

/* Organization page: each place with its beacons in a collapsible section. */
.unit-entry {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.unit-entry > .beacon-item { border: none; background: none; }
.unit-beacons { border-top: 1px solid var(--line); padding: 0 14px; }
.unit-beacons > summary {
  cursor: pointer;
  padding: 10px 0;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
}
.unit-beacons-body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 0 14px; }
.unit-beacon-list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.unit-beacon {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

/* ---------------------------------------------------------------- app preview */

/* Organization editors get a phone beside them (wide screens) or below them (narrow). */
.org-main.org-main-wide { max-width: 1200px; }
.with-preview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.with-preview > .org-section, .with-preview > .org-card { min-width: 0; max-width: 820px; }
@media (min-width: 1140px) {
  .with-preview { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .app-preview { position: sticky; top: 20px; }
}

.app-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 320px; max-width: 100%; justify-self: center; }
.app-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; }
.app-preview-head .field-label { margin: 0; }
.app-preview-head select { padding: 5px 8px; font-size: var(--fs-xs); }
.app-preview-note { text-align: center; margin: 0; }
/* Notifications get a phone's width (banners are ~377 pt wide on a 393 pt iPhone). */
.app-preview.notif-preview { width: 404px; }
@media (min-width: 1140px) {
  .with-preview.with-notif-preview { grid-template-columns: minmax(0, 1fr) 404px; }
}

/* The phone: an iPhone screen (393 × 852 pt) drawn at full size and scaled down. */
.phone {
  --phone-scale: 0.72;
  position: relative;
  width: calc(393px * var(--phone-scale) + 20px);
  height: calc(852px * var(--phone-scale) + 20px);
  border-radius: 46px;
  background: #1c1b1a;
  padding: 10px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #3a3835;
}
.phone-viewport {
  width: calc(393px * var(--phone-scale));
  height: calc(852px * var(--phone-scale));
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  background: var(--bg);
}
.phone-island {
  position: absolute; z-index: 3; top: 18px; left: 50%; transform: translateX(-50%);
  width: 88px; height: 26px; border-radius: 13px; background: #000;
}
.phone-screen {
  width: 393px; height: 852px;
  transform: scale(var(--phone-scale)); transform-origin: top left;
  position: relative; overflow: hidden;
  font-family: var(--font-sans); color: var(--ink);
}

.ps-status { position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 34px 0 46px; font-size: 17px; font-weight: 600; color: #1c1b1a; pointer-events: none; }
.ps-status-icons { display: flex; gap: 6px; align-items: center; }
.ps-status-icons span { display: block; background: #1c1b1a; border-radius: 2px; }

/* Map behind the card: real tiles around the location, the place's marker on top. */
.ps-map { position: absolute; inset: 0; background: #f2efe9; overflow: hidden; }
.ps-map img { position: absolute; width: 256px; height: 256px; user-select: none; pointer-events: none; }
.ps-map-empty { position: absolute; left: 0; right: 0; top: 180px; text-align: center; font-size: 15px; color: #6f665c; }
.ps-marker {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 10px; border: 2px solid var(--place); background: var(--place-soft);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.12); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px; color: var(--place-ink);
}
.ps-marker img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }

/* The card (FixedBeaconSheet): bottom of the screen over the map. */
.ps-sheet {
  position: absolute; left: 12px; right: 12px; bottom: 34px; max-height: 600px; overflow-y: auto; scrollbar-width: none;
  background: var(--surface); border-radius: 28px; padding: 18px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.18), 0 4px 12px rgb(0 0 0 / 0.08);
  display: flex; flex-direction: column;
}
.ps-home { position: absolute; z-index: 2; bottom: 9px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 3px; background: var(--ink); opacity: 0.85; }
.ps-head { display: flex; gap: 14px; align-items: flex-start; }
.ps-photo {
  flex: none; width: 56px; height: 56px; border-radius: 12px; border: 2px solid var(--place); background: var(--place-soft);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-size: 20px; font-weight: 600; color: var(--place-ink);
}
.ps-photo img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.ps-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ps-name { font-family: var(--font-display); font-size: 24px; line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; }
.ps-name.placeholder { color: var(--ink-3); }
.ps-entity { font-size: 15px; color: var(--ink-2); }
.ps-distance { font-size: 13px; color: var(--ink-3); }
.ps-close { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: 15px; }
.ps-section { margin-top: 14px; }
.ps-hours { display: flex; align-items: flex-start; gap: 12px; }
.ps-pill { flex: none; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.ps-pill.open { background: oklch(0.94 0.04 145); color: oklch(0.42 0.08 145); }
/* Day column as wide as its widest label, so the times line up. */
.ps-week { display: grid; grid-template-columns: max-content auto; column-gap: 12px; row-gap: 4px; padding-top: 4px; font-size: 13px; color: var(--ink-2); }
.ps-week .today { font-weight: 600; }
.ps-ranges { display: flex; flex-direction: column; gap: 2px; font-variant-numeric: tabular-nums; }
.ps-note { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.ps-contact { display: flex; gap: 8px; }
.ps-contact div {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  font-size: 13px; font-weight: 500; color: var(--ink);
}
.ps-contact svg { width: 18px; height: 18px; fill: var(--place-ink); }
.ps-description { font-size: 15px; color: var(--ink-2); line-height: 1.4; overflow-wrap: anywhere; }
.ps-label { font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.ps-chips { display: flex; gap: 6px; flex-wrap: nowrap; overflow: hidden; }
.ps-chips span { flex: none; font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; background: var(--surface-2); }
.ps-follow { margin-top: 18px; height: 50px; border-radius: 14px; background: var(--primary); color: var(--ink-on-primary); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; }
.ps-help { font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.ps-report { font-size: 13px; color: var(--ink-3); margin-top: 10px; }

/* ---------------------------------------------------------------- notification preview */

/* Each platform's notification on its own backdrop, matched against device screenshots:
   an iPhone lock screen (glass cards, white text) and a Pixel notification shade. */
.np-stack { width: 100%; display: flex; flex-direction: column; gap: 18px; }
.np-device { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px 16px; border-radius: 22px; }
.np-device > .caption { font-weight: 600; padding-left: 4px; }
.np-device:first-child { background: linear-gradient(165deg, #8f8478, #b3a596 45%, #6f7a64); }
.np-device:first-child > .caption { color: rgba(255, 255, 255, 0.85); }
.np-device:last-child { background: linear-gradient(170deg, #c6d2e4, #b7c6dc); }
.np-device:last-child > .caption { color: #3b4250; }
.np-placeholder { opacity: 0.5; }

/* iPhone: frosted glass with a light rim, white text. */
.np-ios {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--font-sans);
  color: #fff;
}
.np-ios-icon { flex: none; width: 38px; height: 38px; border-radius: 9px; overflow: hidden; margin-top: 1px; }
.np-ios-icon img { display: block; width: 100%; height: 100%; }
.np-ios-text { min-width: 0; flex: 1; font-size: 15px; line-height: 1.3; }
.np-ios-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.np-ios-title, .np-ios-subtitle { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-ios-body { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.np-time { flex: none; font-size: 13px; color: rgba(255, 255, 255, 0.72); }

/* Android: light card, round icon on the left, "title • time" on one line. */
.np-android {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 44px 16px 16px;
  border-radius: 28px;
  background: rgba(240, 244, 250, 0.82);
  font-family: Roboto, "Google Sans", var(--font-sans);
  color: #1d2129;
}
.np-android-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.np-android-icon img { display: block; width: 100%; height: 100%; }
.np-android-text { min-width: 0; flex: 1; font-size: 15px; line-height: 1.4; }
.np-android-head { font-size: 13px; color: #4a5160; margin-bottom: 4px; }
.np-android-title { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 6px; }
.np-android-body { color: #2f3542; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.np-android-line { white-space: pre-line; }
/* The expand button, a small pill with a chevron. */
.np-android-expand {
  position: absolute;
  top: 14px;
  right: 12px;
  width: 26px;
  height: 18px;
  border-radius: 9px;
  background: rgba(60, 70, 90, 0.1);
}
.np-android-expand::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid #3b4250;
  border-bottom: 1.5px solid #3b4250;
  transform: translate(-50%, -30%) rotate(-135deg);
}

/* ---------------------------------------------------------------- updated terms */

/* Banner on the Organization page while updated terms await acceptance (OrgTerms). */
.terms-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--place-soft);
}
.terms-banner[hidden] { display: none; }
.terms-banner p { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--ink-2); }
.terms-banner.overdue { border-color: var(--danger); }
.terms-dialog {
  max-width: 520px;
  width: calc(100% - 32px);
  border: none;
  border-radius: var(--r-md);
  padding: 22px;
  background: var(--surface);
  color: var(--ink);
}
.terms-dialog::backdrop { background: rgba(0, 0, 0, 0.4); }
.terms-dialog .check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; }

/* ---------------------------------------------------------------- footer and legal page */

.org-footer {
  margin-top: 48px;
  padding: 20px 24px 28px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--ink-3);
}
.org-footer p { margin: 6px 0 0; }
.org-footer a { color: var(--primary-ink); }
.org-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; }
.org-footer-copy { font-size: var(--fs-xs); }

/* Terms of Service and Privacy Policy for Organizations (Org/legal.leaf). */
.legal-doc { max-width: 760px; margin: 0 auto; }
.legal-doc .legal-toc { margin: 8px 0 20px; font-size: var(--fs-sm); color: var(--ink-3); }
.legal-doc .legal-toc .container { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.legal-doc .legal-toc-label { text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--fs-xs); }
.legal-doc .legal-intro { color: var(--ink-2); }
.legal-doc .legal-section { margin-top: 36px; }
.legal-doc .legal-section-title { font-size: 26px; margin: 0 0 6px; }
.legal-doc .anchor-link { color: var(--ink-3); text-decoration: none; font-size: 0.7em; margin-left: 6px; }
.legal-doc .legal-effective { font-style: italic; color: var(--ink-3); }
.legal-doc h3 { font-size: 17px; margin: 26px 0 8px; }
.legal-doc p, .legal-doc li { line-height: 1.6; }
.legal-doc ul { padding-left: 22px; }
.legal-doc li { margin-bottom: 8px; }
.legal-doc a { color: var(--primary-ink); }
/* Translations: the English version prevails (like the website's legal pages). */
.legal-translation-note {
  background: var(--place-soft);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.legal-translation-note a { color: inherit; font-weight: 600; }
