:root {
  --ink: #102033;
  --muted: #5d6977;
  --paper: #f4f1ea;
  --surface: #fffdf9;
  --line: rgba(16, 32, 51, 0.13);
  --accent: #27636b;
  --accent-2: #a8d4c7;
  --shadow: 0 28px 80px rgba(22, 34, 47, 0.10);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
}

* { box-sizing: border-box; }
.app-card > a { color: inherit; text-decoration: none; }
.app-card .card-meta { flex-wrap: wrap; gap: 12px; }
.app-card .card-meta a { color: var(--accent); }
.app-card.is-coming-soon { background: #eef0f1; box-shadow: none; }
.app-card.is-coming-soon::before { display: none; }
.coming-art { display: block; width: 88px; height: 88px; margin-bottom: 24px; border-radius: 24px; background: radial-gradient(circle at 35% 35%, #b5bdc1, #dfe3e5 65%); filter: blur(4px) grayscale(1); }
.home-hero .home-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
.home-hero .hero-note { max-width: 720px; }
.home-hero .pg-claim { max-width: none; font-size: clamp(1.4rem, 5.8vw, 4.8rem); line-height: 1.18; }
.pg-claim span { display: block; white-space: nowrap; }
.pg-claim em { color: #782e43; font-style: italic; font-weight: inherit; }
@media (min-width: 900px) { .pg-claim span + span { margin-left: .8em; } }
@media (min-width: 901px) { .app-grid > .app-card:nth-child(-n+4) { grid-column: span 6; } }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--accent-2) 36%, transparent), transparent 34rem),
    linear-gradient(180deg, #faf8f3 0%, var(--paper) 70%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  line-height: 1.62;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--ink);
  color: white;
  border-radius: 10px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px max(24px, calc((100vw - 1180px) / 2));
  background: rgba(250, 248, 243, 0.82);
  border-bottom: 1px solid rgba(16, 32, 51, 0.08);
  backdrop-filter: blur(22px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--ink);
  color: white;
  font-size: 13px;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 24px rgba(16, 32, 51, 0.20);
}

.top-nav { display: flex; align-items: center; gap: 18px; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 650; }
.top-nav a:hover { color: var(--ink); }

.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.home-hero { padding: clamp(68px, 10vw, 132px) 0 60px; }
.home-hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: 70px; align-items: end; }

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin-top: 0;
  font-family: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  letter-spacing: -0.035em;
  line-height: 1.08;
  hyphens: auto;
  overflow-wrap: break-word;
}

h1 { max-width: 820px; margin-bottom: 26px; font-size: clamp(48px, 7.8vw, 96px); font-weight: 620; }
h2 { font-size: clamp(32px, 4vw, 54px); font-weight: 620; }
h3 { margin-bottom: 12px; font-size: clamp(21px, 2vw, 28px); font-weight: 650; }

.lead { max-width: 760px; margin: 0; color: var(--muted); font-size: clamp(18px, 2vw, 23px); line-height: 1.55; }
.hero-note { padding: 26px; background: rgba(255, 253, 249, 0.72); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.hero-note strong { display: block; margin-bottom: 8px; font-size: 18px; }
.hero-note p { margin: 0; color: var(--muted); }

.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin: 42px 0 28px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading p { max-width: 480px; margin: 0 0 5px; color: var(--muted); }

.app-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; padding-bottom: 100px; }
.app-card {
  --card-a: var(--accent);
  --card-b: var(--accent-2);
  grid-column: span 4;
  display: flex;
  min-height: 330px;
  flex-direction: column;
  padding: 26px;
  color: var(--ink);
  background: rgba(255, 253, 249, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(22, 34, 47, 0.05);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.app-card:first-child, .app-card:nth-child(5) { grid-column: span 6; }
.app-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--card-a) 45%, var(--line)); box-shadow: var(--shadow); }
.app-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 22px;
  color: white;
  background: linear-gradient(145deg, var(--card-a), var(--card-b));
  box-shadow: inset 0 1px rgba(255,255,255,.28), 0 15px 35px color-mix(in srgb, var(--card-a) 28%, transparent);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.04em;
}
.app-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.publication-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.publication-status::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ""; }
.publication-status.is-unpublished { color: #80550b; background: #fff4dc; border-color: #ebcf98; }
.publication-status.is-prepared { color: #265b71; background: #e8f5fa; border-color: #acd1df; }
.publication-status.is-submitted { color: #614599; background: #f1ebff; border-color: #cabbed; }
.publication-status.is-published { color: #176039; background: #e7f7ed; border-color: #add8bc; }
.publication-status.is-unknown { color: var(--muted); background: rgba(16,32,51,.055); border-color: var(--line); }
.app-card > .publication-status { margin-bottom: 22px; }
.app-card h3 { margin-bottom: 10px; }
.app-card p { margin: 0; color: var(--muted); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: auto; padding-top: 26px; color: var(--muted); font-size: 13px; font-weight: 700; }
.arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--card-a) 12%, white); color: var(--card-a); }

.empty-portfolio {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-bottom: 100px;
  padding: clamp(28px, 5vw, 52px);
  background: rgba(255, 253, 249, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(22, 34, 47, 0.05);
}
.empty-portfolio > span { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: white; background: var(--ink); font-weight: 850; }
.empty-portfolio h3, .empty-portfolio p { margin: 0; }
.empty-portfolio p { max-width: 660px; color: var(--muted); }

.app-hero { padding: clamp(60px, 9vw, 110px) 0 48px; }
.app-hero-inner { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(230px, 0.38fr); align-items: center; gap: 32px; }
.app-hero .app-icon { width: 104px; height: 104px; margin: 0; border-radius: 30px; font-size: 28px; }
.app-hero h1 { margin: 0 0 14px; font-size: clamp(48px, 7vw, 82px); }
.app-hero .lead { font-size: 19px; }
.facts { display: grid; gap: 10px; margin: 0; padding: 22px; background: rgba(255,253,249,.74); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.facts div { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: right; }
.facts .publication-status { justify-self: end; }

.app-tabs-wrap { position: sticky; top: 71px; z-index: 15; padding: 10px 0; background: linear-gradient(180deg, var(--paper) 0%, rgba(244,241,234,.92) 72%, transparent 100%); }
.app-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 7px; background: rgba(255,253,249,.86); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 34px rgba(22,34,47,.06); scrollbar-width: none; }
.app-tabs::-webkit-scrollbar { display: none; }
.app-tabs a { flex: 0 0 auto; padding: 11px 17px; border-radius: 12px; color: var(--muted); font-size: 14px; font-weight: 750; text-decoration: none; }
.app-tabs a:hover { color: var(--ink); background: color-mix(in srgb, var(--accent) 6%, white); }
.app-tabs a.is-active { color: white; background: var(--ink); box-shadow: 0 7px 18px rgba(16,32,51,.18); }

.tab-area { padding: 42px 0 100px; }
.tab-panel { animation: rise 260ms ease both; }
.tab-panel[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } }
.tab-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(240px, .45fr); gap: 50px; align-items: end; padding: 20px 0 34px; border-bottom: 1px solid var(--line); }
.tab-intro h2 { margin-bottom: 14px; }
.tab-intro p { margin: 0; color: var(--muted); font-size: 18px; }
.updated { justify-self: end; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; }

.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 28px; }
.info-card { padding: 28px; background: rgba(255,253,249,.82); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.info-card.wide { grid-column: 1 / -1; }
.info-card p:last-child, .info-card ul:last-child { margin-bottom: 0; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; padding-left: 20px; }

.legal-stack { display: grid; gap: 18px; margin-top: 28px; }
.legal-section { padding: clamp(24px, 4vw, 40px); background: rgba(255,253,249,.86); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(22,34,47,.035); }
.legal-section p { margin: 0 0 14px; }
.legal-section p:last-child, .legal-section ul:last-child, .legal-section ol:last-child { margin-bottom: 0; }
.legal-section ul, .legal-section ol { padding-left: 22px; }
.legal-section li + li { margin-top: 8px; }
.legal-section address { font-style: normal; }
.callout { padding: 18px 20px; background: color-mix(in srgb, var(--accent-2) 22%, white); border-left: 4px solid var(--accent); border-radius: 0 13px 13px 0; }
.warning { background: #fff4dc; border-left-color: #c77b08; }
.danger { background: #fff0ef; border-left-color: #b3403a; }
.publication-card { padding: 24px; background: color-mix(in srgb, var(--accent-2) 11%, white); border: 1px solid var(--line); border-radius: var(--radius-md); }
.publication-card > p { margin-top: 14px; }
.publication-meta { display: grid; gap: 8px; margin: 18px 0 0; }
.publication-meta div { display: grid; grid-template-columns: minmax(130px, .45fr) minmax(0, 1fr); gap: 18px; padding-top: 8px; border-top: 1px solid var(--line); }
.publication-meta dt { color: var(--muted); }
.publication-meta dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; margin: 20px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 14px 15px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: rgba(16,32,51,.045); font-weight: 780; }
code { padding: .15em .4em; background: rgba(16,32,51,.07); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; overflow-wrap: anywhere; }

.legal-page { padding: clamp(70px, 9vw, 110px) 0 100px; }
.legal-page-header { max-width: 820px; margin-bottom: 48px; }
.legal-page-header h1 { font-size: clamp(48px, 7vw, 78px); }

.site-footer { padding: 42px max(24px, calc((100vw - 1180px) / 2)); color: #cbd4dc; background: #102033; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 30px; }
.site-footer strong { display: block; margin-bottom: 6px; color: white; }
.site-footer p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; }
.site-footer a { color: white; }
.footer-meta { margin-top: 24px !important; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: 12px; color: #9eacb8; }

@media (max-width: 900px) {
  .home-hero-grid, .app-hero-inner, .tab-intro { grid-template-columns: 1fr; gap: 28px; }
  .app-hero-inner { justify-items: start; }
  .facts { width: 100%; }
  .updated { justify-self: start; }
  .app-card, .app-card:first-child, .app-card:nth-child(5) { grid-column: span 6; }
}

@media (max-width: 650px) {
  .site-header { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .top-nav { flex-wrap: wrap; gap: 12px; }
  .shell { width: min(100% - 28px, 1180px); }
  .home-hero { padding-top: 62px; }
  h1 { font-size: clamp(42px, 13vw, 58px); hyphens: none; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .section-heading p { max-width: none; }
  .app-card, .app-card:first-child, .app-card:nth-child(5) { grid-column: 1 / -1; }
  .app-hero .app-icon { width: 86px; height: 86px; border-radius: 25px; }
  .overview-grid, .feature-list { grid-template-columns: 1fr; }
  .publication-meta div { grid-template-columns: 1fr; gap: 2px; }
  .info-card.wide { grid-column: auto; }
  .app-tabs-wrap { top: 70px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .site-header, .app-tabs-wrap, .site-footer { display: none; }
  body { background: white; }
  .tab-panel[hidden] { display: block; }
  .tab-panel { break-before: page; }
  .legal-section, .info-card { box-shadow: none; break-inside: avoid; }
}

body.rly-page { --ink: #15191d; --muted: #596168; --paper: #f3f5ef; --surface: #ffffff; --accent: #566f00; --accent-2: #c9ff38; }
.rly-page .brand-mark { background: #c9ff38; color: #111; }
.rly-card { background: linear-gradient(145deg, rgba(201,255,56,.13), rgba(255,255,255,.9)); }
.rly-button { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:12px 18px; border-radius:14px; background:#15191d; color:#fff; font-weight:800; text-decoration:none; }
.rly-button.secondary { color:#15191d; background:#c9ff38; }
body.nadumo-page { --ink: #10254a; --muted: #53627a; --paper: #f3f8ff; --surface: #ffffff; --accent: #155eef; --accent-2: #12c6b2; }
.nadumo-page .brand-mark { background: linear-gradient(135deg, #155eef, #12c6b2); color: #fff; }
.nadumo-card { background: linear-gradient(145deg, rgba(21,94,239,.10), rgba(18,198,178,.08), rgba(255,255,255,.94)); }
.nadumo-button { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:12px 18px; border-radius:14px; background:#10254a; color:#fff; font-weight:800; text-decoration:none; }
.nadumo-button.secondary { background:#d8f8f2; color:#10254a; }
.button-row { display:flex; flex-wrap:wrap; gap:12px; margin-top:20px; }
.claim-code { display:block; margin:18px 0; padding:16px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.75); overflow-wrap:anywhere; }
