/* Ordli app replica.
   Every number here is copied from the app's own source: app/src/theme/tokens.ts
   and the StyleSheets in app/src/components and app/src/screens. The device
   renders at a true 375 x 812 and is scaled as a whole, so proportions match
   the running app exactly. Flat colour only — no gradients, same as the app. */

@font-face {
  font-family: 'Ordlicons';
  src: url('../fonts/Ionicons.ttf') format('truetype');
  font-display: block;
}

.device-stage { display: flex; justify-content: center; }

.device-scale {
  /* Holds the scaled device's real footprint so the page lays out correctly. */
  width: calc(395px * var(--device-scale, 1));
  height: calc(832px * var(--device-scale, 1));
  position: relative;
  flex: none;
}

.device {
  position: absolute; top: 0; left: 0;
  /* 375 x 812 of app, inside a 10px bezel — so the screen is life size. */
  width: 395px; height: 832px;
  transform: scale(var(--device-scale, 1));
  transform-origin: top left;
  border-radius: 46px;
  background: #0B0F0E;
  border: 10px solid #151B19;
  box-shadow: 0 26px 70px rgba(9, 22, 17, 0.26);
  overflow: hidden;
  font-family: 'Schibsted Grotesk', sans-serif;
  color: #F2F5F3;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}

.d-screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding-top: 18px; }
.d-screen.light { background: #FFFFFF; color: #0E1613; }

/* ---------- Icons: the app's own Ionicons font ---------- */

.i {
  font-family: 'Ordlicons';
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  display: inline-block;
  speak: none;
}

/* ---------- Top bar (HomeScreen.styles.topBar) ---------- */

.d-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 16px 0;
}
.d-streak {
  display: flex; align-items: center; gap: 6px;
  background: #151B19; border-radius: 999px; padding: 7px 12px;
}
.d-streak .i { font-size: 16px; color: #F59E0B; }
.d-streak span { font-size: 13px; line-height: 17px; font-weight: 600; }
.d-topright { display: flex; align-items: center; gap: 14px; }
.d-count { font-size: 13px; line-height: 17px; font-weight: 600; color: #98A29D; }
.d-bell { font-size: 24px; color: #F2F5F3; position: relative; }
.d-avatar {
  width: 32px; height: 32px; border-radius: 999px; background: #123D2F;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11.5px; color: #fff;
}

/* ---------- For you / Following (HomeScreen.styles.segment) ---------- */

.d-segment { display: flex; justify-content: center; gap: 28px; padding: 10px 0 4px; }
.d-seg { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.d-seg span { font-size: 17px; line-height: 22px; font-weight: 600; color: #66716C; }
.d-seg i { width: 22px; height: 3px; border-radius: 2px; background: transparent; display: block; }
.d-seg.on span { color: #F2F5F3; }
.d-seg.on i { background: #3FB47A; }

/* ---------- Deck (HomeScreen.styles.deck) ---------- */

.d-deck { flex: 1; padding: 6px 16px 0; position: relative; min-height: 0; }
.d-deck-inner { position: absolute; inset: 6px 16px 0; }

.d-cardwrap { position: absolute; inset: 0; }
.d-cardwrap.top { box-shadow: 0 12px 24px rgba(0,0,0,0.28); cursor: grab; }
.d-cardwrap.top.dragging { cursor: grabbing; }
.d-cardwrap.next { opacity: 0.35; transform: scale(0.94); }

/* The flat green panel the app reveals on a right swipe (SwipeDeck.styles.saved) */
.d-saved {
  position: absolute; inset: 0; background: #1E7B4F; border-radius: 24px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding-left: 32px; opacity: 0; pointer-events: none;
}
.d-saved .i { font-size: 46px; color: #fff; }
.d-saved b { font-size: 24px; line-height: 29px; letter-spacing: -0.4px; font-weight: 700; color: #fff; }

/* ---------- The card (FeedCard.styles) ---------- */

.d-card {
  position: absolute; inset: 0;
  background: #151B19; border-radius: 24px; overflow: hidden;
  display: flex; flex-direction: column;
}
.d-photo { position: relative; height: 46%; flex: none; overflow: hidden; transition: height 0.24s ease; }
.d-card.expanded .d-photo { height: 24%; }
.d-photo .big {
  position: absolute; width: 95%; aspect-ratio: 1; border-radius: 9999px;
  right: -32%; bottom: -55%;
}
.d-photo .small {
  position: absolute; width: 30%; aspect-ratio: 1; border-radius: 9999px;
  left: -6%; top: -10%; background: rgba(255,255,255,0.08);
}
.d-photo .glyph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.92); font-size: 76px; transition: font-size 0.24s ease;
}
.d-card.expanded .d-photo .glyph { font-size: 42px; }

.d-content {
  flex: 1; min-height: 0; padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 12px; overflow: hidden;
}
.d-card.expanded .d-content { overflow-y: auto; }

.d-meta { display: flex; align-items: center; gap: 10px; flex: none; }
.d-pill {
  border-radius: 999px; padding: 4px 11px;
  font-size: 12px; line-height: 16px; font-weight: 500; color: #fff;
}
.d-author { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-height: 26px; }
.d-authormark {
  width: 22px; height: 22px; border-radius: 11px; background: #15291F;
  display: flex; align-items: center; justify-content: center;
}
.d-authormark .i { font-size: 12px; color: #3FB47A; }
.d-author span { font-size: 12px; line-height: 16px; font-weight: 500; color: #98A29D; }

.d-hook {
  flex: none;
  font-size: 30px; line-height: 34px; letter-spacing: -0.7px; font-weight: 800; color: #F2F5F3;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.d-hook.small { font-size: 25px; line-height: 29px; letter-spacing: -0.5px; }
.d-card.expanded .d-hook { -webkit-line-clamp: unset; display: block; }

.d-body {
  font-size: 16px; line-height: 23px; color: #98A29D; flex: none;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.d-card.expanded .d-body { -webkit-line-clamp: unset; display: block; }

.d-why { background: #1C2421; border-radius: 14px; padding: 14px; margin-top: 4px; display: flex; flex-direction: column; gap: 6px; }
.d-why-head { display: flex; align-items: center; justify-content: space-between; }
.d-why-head b { font-size: 17px; line-height: 22px; font-weight: 600; color: #F2F5F3; }
.d-why-head .i { font-size: 18px; color: #98A29D; }
.d-why p { font-size: 14px; line-height: 20px; color: #98A29D; }

.d-source { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.d-source .dot { width: 12px; height: 12px; border-radius: 6px; border: 3px solid #98A29D; flex: none; }
.d-source .text { flex: 1; min-width: 0; }
.d-source .text small { display: block; font-size: 12px; line-height: 16px; font-weight: 500; color: #66716C; }
.d-source .text b { display: block; font-size: 13px; line-height: 17px; font-weight: 600; color: #F2F5F3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.d-hint { flex: none; margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; }
.d-hint span { font-size: 13px; line-height: 17px; font-weight: 600; color: #98A29D; }
.d-hint .i { font-size: 17px; color: #98A29D; }

/* ---------- Action bar (ActionBar.styles) ---------- */

.d-actions { padding: 12px 16px 10px; display: flex; align-items: center; gap: 10px; }
.d-circle {
  width: 54px; height: 54px; border-radius: 27px; border: 1.5px solid #242C29;
  display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
.d-circle .i { font-size: 24px; color: #F2F5F3; }
.d-actionpill {
  flex: 1; height: 54px; border-radius: 999px; background: #151B19;
  display: flex; align-items: center; justify-content: space-around; padding: 0 4px;
}
.d-act {
  min-width: 40px; height: 44px; border-radius: 22px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center; gap: 3px; cursor: pointer;
}
.d-act .i { font-size: 22px; color: #F2F5F3; }
.d-act b { font-size: 12px; line-height: 16px; font-weight: 500; color: #98A29D; }
.d-act.liked .i { color: #EF6A61; }
.d-act.saved .i { color: #3FB47A; }

/* ---------- Tab bar ---------- */

.d-tabbar {
  display: flex; align-items: flex-start; justify-content: space-around;
  border-top: 1px solid #242C29; background: #0B0F0E; padding: 6px 0 10px; flex: none;
}
.d-screen.light .d-tabbar { border-top-color: #E3E8E5; background: #fff; }
.d-tab { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 70px; cursor: pointer; }
.d-tab .i { font-size: 22px; color: #66716C; }
.d-tab span { font-size: 11px; font-weight: 600; color: #66716C; }
.d-tab.on .i, .d-tab.on span { color: #F2F5F3; }
.d-screen.light .d-tab.on .i, .d-screen.light .d-tab.on span { color: #123D2F; }
.d-post {
  width: 42px; height: 30px; border-radius: 10px; background: #F2F5F3;
  display: flex; align-items: center; justify-content: center;
}
.d-post .i { font-size: 24px; color: #0E1613; }
.d-screen.light .d-post { background: #123D2F; }
.d-screen.light .d-post .i { color: #fff; }

/* ---------- Other screens ---------- */

.d-page { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.d-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px 12px; }
.d-head h4 { font-size: 30px; line-height: 35px; letter-spacing: -0.6px; font-weight: 700; margin: 0; }
.d-head .i { font-size: 22px; color: #F2F5F3; }

.d-search {
  margin: 0 20px; display: flex; align-items: center; gap: 10px;
  background: #151B19; border-radius: 12px; padding: 0 14px; min-height: 46px;
}
.d-search .i { font-size: 18px; color: #98A29D; }
.d-search span { font-size: 16px; color: #66716C; }

.d-chips { display: flex; gap: 8px; padding: 12px 20px 4px; }
.d-chip {
  border-radius: 999px; padding: 8px 16px; border: 2px solid #242C29;
  font-size: 13px; line-height: 17px; font-weight: 600; color: #98A29D; cursor: pointer;
}
.d-chip.on { background: #F2F5F3; border-color: #F2F5F3; color: #0E1613; }

.d-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.d-listrow { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 14px; }
.d-topicicon { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; flex: none; }
.d-topicicon .i { font-size: 22px; }
.d-listrow .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.d-listrow .text b { font-size: 17px; line-height: 22px; font-weight: 600; color: #F2F5F3; }
.d-listrow .text small { font-size: 13px; line-height: 17px; font-weight: 600; color: #98A29D; }
.d-listrow > .i { font-size: 18px; color: #66716C; }

.d-cardrow { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; }
.d-thumb { width: 60px; height: 60px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; }
.d-thumb .i { font-size: 26px; color: rgba(255,255,255,0.92); }
.d-cardrow .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.d-cardrow .text b {
  font-size: 16px; line-height: 19px; font-weight: 600; color: #F2F5F3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.d-tag { align-self: flex-start; border-radius: 999px; padding: 2px 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: #fff; }

/* Empty state (States.tsx) */
.d-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 28px; text-align: center; }
.d-empty .box { width: 56px; height: 56px; border-radius: 14px; background: #15291F; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.d-empty .box .i { font-size: 26px; color: #3FB47A; }
.d-empty b { font-size: 24px; line-height: 29px; letter-spacing: -0.4px; font-weight: 700; }
.d-empty p { font-size: 16px; line-height: 23px; color: #98A29D; }
.d-btn {
  margin-top: 8px; background: #F2F5F3; color: #0E1613; border-radius: 12px;
  padding: 13px 22px; font-size: 17px; font-weight: 600;
}

/* Profile (ProfileHeader.styles) */
.d-profile { padding: 8px 20px 12px; display: flex; flex-direction: column; gap: 14px; }
.d-identity { display: flex; align-items: center; gap: 16px; }
.d-bigavatar {
  width: 76px; height: 76px; border-radius: 999px; background: #123D2F;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; font-weight: 700; color: #fff; flex: none;
}
.d-names { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.d-names b { font-size: 24px; line-height: 29px; letter-spacing: -0.4px; font-weight: 700; }
.d-names small { font-size: 16px; line-height: 23px; color: #98A29D; }
.d-stats { display: flex; gap: 28px; }
.d-stat { display: flex; align-items: baseline; gap: 5px; }
.d-stat b { font-size: 17px; line-height: 22px; font-weight: 600; }
.d-stat span { font-size: 13px; line-height: 17px; font-weight: 600; color: #98A29D; }
.d-streakrow {
  display: flex; align-items: center; gap: 8px; background: #151B19;
  border-radius: 12px; padding: 12px 14px;
}
.d-streakrow .i { font-size: 18px; color: #F59E0B; }
.d-streakrow b { font-size: 15px; font-weight: 600; }
.d-streakrow small { font-size: 13px; color: #98A29D; flex: 1; }
.d-streakrow .chev { font-size: 16px; color: #66716C; }
.d-profileactions { display: flex; gap: 10px; }
.d-profileactions div {
  flex: 1; text-align: center; border-radius: 12px; padding: 13px 0;
  font-size: 17px; font-weight: 600;
}
.d-profileactions .ghost { background: #151B19; color: #F2F5F3; }
.d-profileactions .solid { background: #F2F5F3; color: #0E1613; }
.d-ptabs { display: flex; border-bottom: 1px solid #242C29; }
.d-ptab { flex: 1; text-align: center; padding: 12px 0; font-size: 17px; font-weight: 600; color: #66716C; }
.d-ptab.on { color: #F2F5F3; box-shadow: inset 0 -2px 0 #F2F5F3; }

/* ---------- Demo controls under the phone ---------- */

.demo-hint {
  margin-top: 18px; text-align: center; font-size: 14px; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.on-dark .demo-hint, .on-forest .demo-hint { color: var(--dark-muted); }
.demo-hint kbd {
  font-family: inherit; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px;
}
.on-dark .demo-hint kbd, .on-forest .demo-hint kbd { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.16); color: var(--dark-text); }

/* ---------- Scroll reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .d-photo, .d-photo .glyph { transition: none; }
}
