/* Anchorio First Encounter v1 — calm, text-led */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #fafafa;
  color: #1a1a1a;
  font-family: Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

.layout {
  display: flex;
  min-height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

/* —— Left frame —— */
.frame-left {
  width: 220px;
  flex-shrink: 0;
  padding: 28px 20px 24px;
  border-right: 1px solid #ebebeb;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}

.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
}

.identity-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.identity-link:hover .identity-name {
  color: #444;
}

.identity-mark {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.identity-mark svg {
  display: block;
  width: 18px;
  height: 18px;
}

.identity-name {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #1a1a1a;
}

.frame-left-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 36px;
}

.frame-left-head .identity {
  margin-bottom: 0;
  min-width: 0;
}

.language-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.4;
}

.language-selector a {
  color: #999;
  text-decoration: none;
  font-weight: 400;
}

.language-selector a.is-active {
  color: #1a1a1a;
  font-weight: 500;
}

.language-selector a:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

.language-selector-separator {
  color: #ccc;
  user-select: none;
}

.nav-primary,
.nav-secondary {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-primary li + li {
  margin-top: 4px;
}

.nav-primary a,
.nav-secondary a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 400;
  color: #666;
  text-decoration: none;
}

.nav-primary a:hover,
.nav-secondary a:hover {
  color: #1a1a1a;
}

.nav-primary a.is-active {
  color: #1a1a1a;
}

.nav-secondary {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid #ebebeb;
}

.nav-secondary a.is-muted {
  color: #999;
  pointer-events: none;
}

/* —— Main —— */
.frame-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.reading-shell {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 48px 24px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

.reading-area {
  width: 100%;
  max-width: 560px;
  min-width: 0;
}

.reading-block {
  margin: 0 0 28px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #1a1a1a;
}

.reading-block.is-continuity {
  color: #444;
}

.reading-block.is-attention-lead {
  margin-bottom: 20px;
}

.reading-block.is-statement p {
  margin: 0;
}

.reading-block.is-statement p + p {
  margin-top: 8px;
}

.section-label {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
}

.reading-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reading-list li {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
}

.reading-list li:last-child {
  margin-bottom: 0;
}

.reading-meta {
  margin: 0 0 28px;
  font-size: 14px;
  font-weight: 400;
  color: #777;
}

.reading-action {
  margin: 0 0 40px;
}

.reading-action a {
  font-size: 16px;
  font-weight: 400;
  color: #444;
  text-decoration: none;
}

.reading-action a:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

.reading-gap {
  margin: 0 0 28px;
  font-size: 16px;
  font-weight: 400;
  color: #666;
  font-style: normal;
}

.reading-unavailable {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: #666;
}

.reading-reference {
  margin: 0 0 28px;
  font-size: 14px;
  font-weight: 400;
  color: #999;
}

/* —— Anchor input —— */
.input-shell {
  flex-shrink: 0;
  padding: 12px 24px 24px;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  border-top: 1px solid #ebebeb;
  background: #fafafa;
}

.input-area {
  width: 100%;
  max-width: 560px;
  min-width: 0;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}

.input-row input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  color: #1a1a1a;
  background: transparent;
}

.input-row input::placeholder {
  color: #999;
}

.input-row button {
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #444;
  cursor: pointer;
}

.input-row button:disabled {
  color: #aaa;
  cursor: not-allowed;
}

.input-row input:disabled {
  color: #999;
}

.branch-table-wrap {
  margin-bottom: 28px;
}

.branch-table-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.branch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.branch-table th,
.branch-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #e8e8e8;
  white-space: nowrap;
}

.branch-table th {
  font-weight: 500;
  color: #444;
}

.conversation-founder p,
.conversation-anchor p {
  margin: 0;
}

.conversation-founder {
  color: #666;
  font-size: 15px;
}

.conversation-anchor {
  color: #1a1a1a;
}

.link-button {
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 16px;
  color: #444;
  cursor: pointer;
  text-decoration: none;
}

.link-button:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

.input-privacy {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #999;
}

.input-privacy a {
  color: #777;
  text-decoration: none;
}

.input-privacy a:hover {
  color: #444;
  text-decoration: underline;
}

/* —— Static public pages —— */
.static-body {
  overflow: auto;
  height: auto;
  min-height: 100%;
}

.static-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.static-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.static-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.static-identity:hover .identity-name {
  color: #444;
}

.static-title {
  margin: 0 0 24px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  color: #1a1a1a;
}

.static-lead {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
}

.static-content p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.static-content a {
  color: #666;
  text-decoration: none;
}

.static-content a:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

.static-content p:last-child {
  margin-bottom: 0;
}

.static-section {
  margin-top: 32px;
}

.static-heading {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: #1a1a1a;
}

.static-list {
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}

.static-list li {
  margin-bottom: 6px;
}

.static-meta {
  font-size: 14px;
  color: #777;
}

.static-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #ebebeb;
}

.static-links a {
  font-size: 14px;
  color: #666;
  text-decoration: none;
}

.static-links a:hover {
  color: #1a1a1a;
  text-decoration: underline;
}

/* —— Mobile —— */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .frame-left {
    width: 100%;
    flex-shrink: 0;
    border-right: none;
    border-bottom: 1px solid #ebebeb;
    padding: 10px 16px 8px;
  }

  .identity {
    margin-bottom: 6px;
  }

  .frame-left-head {
    margin-bottom: 6px;
    gap: 8px;
  }

  .language-selector {
    font-size: 12px;
    gap: 4px;
  }

  .identity-name {
    font-size: 13px;
  }

  .nav-primary {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-primary li {
    flex: 0 0 auto;
  }

  .nav-primary a,
  .nav-secondary a {
    padding: 4px 0;
    font-size: 13px;
    white-space: nowrap;
  }

  .nav-primary li + li {
    margin-top: 0;
  }

  .nav-secondary {
    display: none;
  }

  .frame-main {
    flex: 1;
    min-height: 0;
  }

  .reading-shell {
    padding: 20px 16px 12px;
  }

  .input-shell {
    padding: 10px 16px max(12px, env(safe-area-inset-bottom, 0px));
  }

  .reading-block {
    margin-bottom: 20px;
  }

  .reading-meta {
    margin-bottom: 20px;
  }

  .branch-table-wrap {
    margin-bottom: 20px;
  }
}

@media (prefers-color-scheme: dark) {
  /* Keep light reading surface for v1 — product contract targets near-white */
}
