/* ==========================================================================
   FIELD NOTES — PAGE-SPECIFIC STYLES
   Uses ../style.css for the shared Family Design Lab visual foundation.
   This file should contain only Field Notes layout and component styles.
   ========================================================================== */

/* Field Notes has a narrower reading column than the main homepage. */
body {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* HEADER
   Uses the exact .wrap > nav > .logo + .navlinks structure from the homepage.
   Header appearance comes directly from the shared style.css.
   The current-page link is only bolded; all other navigation rules are shared. */
.field-notes-current {
  font-weight: 700 !important;
}

/* INTRO
— large but restrained, matching the main site's editorial typography. */
.page {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  padding: 0 28px 350px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 1.7px;
  text-transform: uppercase;
  font-weight: 700;
}
.eyebrow svg { width: 16px; height: 16px; }
.intro { padding: 36px 0 25px; }
.page h1 {
  color: var(--accent);
  margin: 12px 0 14px;
  font-size: clamp(42px, 8vw, 64px);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 800;
}
.intro p {
  max-width: 540px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}
.rule { height: 4px; width: 58px; background: var(--accent); margin-top: 23px; }
.panel { background: transparent; border: 0; padding: 0; margin-top: 15px; }

/* CONVERSATION */
.thread { display: none; margin-top: 20px; padding-top: 8px; }
.thread-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.thread-head strong { font-size: 14px; }
.reset {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  padding: 9px 11px;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}
.reset:hover { border-color: var(--accent); color: var(--accent); }
.reset svg { width: 14px; height: 14px; }
.bubble {
  padding: 15px 16px;
  border-radius: 16px;
  margin: 12px 0;
  max-width: 96%;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.bubble.user {
  background: #f2f4ff;
  color: var(--ink);
  margin-left: auto;
}
.bubble.assistant {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  margin-right: auto;
}
.bubble .who {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}
.bubble .who svg { width: 15px; height: 15px; }

/* ACTIVITY CARDS — blue accent, softer corners and icons to distinguish doing tasks. */
.activity-card {
  margin-top: 15px;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 16px;
  background: #fbfbff;
}
.activity-top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.activity-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: #e9edff;
  border-radius: 14px;
}
.activity-icon svg { width: 23px; height: 23px; }
.activity-label { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; margin-bottom: 4px; }
.activity-title { font-size: 16px; line-height: 1.3; font-weight: 700; letter-spacing: -.2px; }
.activity-copy { font-size: 14px; line-height: 1.65; color: #33333a; white-space: pre-wrap; }
.activity-foot { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); }
.activity-foot svg { width: 15px; height: 15px; color: var(--accent); flex: 0 0 auto; }

/* RESPONSE / ERROR PANEL */
.response {
  display: none;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: #fbfbff;
  border-radius: 16px;
  padding: 17px;
}
.response-head { display: flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; font-size: 11px; letter-spacing: 1.1px; text-transform: uppercase; }
.response-head svg { width: 17px; height: 17px; }
.response p { font-size: 14px; line-height: 1.65; margin: 12px 0 0; }
.response .note { color: var(--muted); font-size: 11px; margin-top: 13px; }

/* FIXED COMPOSER — remains above the device's safe area and anchored at the bottom. */
.composer-dock {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.composer-inner { max-width: 716px; margin: 0 auto; }
.upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 0 10px;
  border: 1.5px dashed #aebaff;
  background: #fafaff;
  border-radius: 16px;
  padding: 13px 12px;
  text-align: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  min-height: 84px;
}
.upload:hover { border-color: var(--accent); background: #f3f5ff; }
.upload-icon { width: 23px; height: 23px; color: var(--accent); }
.upload strong { display: block; font-size: 13px; }
.upload small { display: block; color: var(--muted); font-size: 11px; margin-top: 0; }
input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.preview-wrap { display: none; margin: 0 0 8px; }
.preview-wrap img { max-width: 100%; max-height: 120px; display: block; border-radius: 14px; }
.remove { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 8px 0 0; font-size: 11px; }
.remove svg { width: 13px; height: 13px; }
label.field-label { display: none; }
textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid #d8d8d8;
  border-radius: 14px;
  padding: 13px 14px;
  font: 14px/1.5 Arial, sans-serif;
  outline: none;
  background: white;
  color: var(--ink);
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #123cff12; }
.button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  width: 46px;
  height: 46px;
  padding: 0;
  cursor: pointer;
  margin: 0;
  flex: 0 0 46px;
}
.button svg { width: 20px; height: 20px; }
.button:hover { background: #0029df; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.composer-tools { display: flex; align-items: flex-end; gap: 8px; }
.composer-tools textarea { flex: 1; min-width: 0; }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.composer-hint { display: flex; align-items: flex-start; gap: 6px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.composer-hint svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--accent); margin-top: 1px; }
.composer-dock .reset { flex: 0 0 auto; }
.composer-dock .preview-wrap { margin: 0 0 8px; }
.composer-dock .preview-wrap img { max-height: 100px; margin: 0 auto 0 0; }

/* THE FOUR-STEP FDL JOURNEY */
.journey { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 30px 0 6px; }
.journey-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 14px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
}
.journey-item svg { width: 23px; height: 23px; color: var(--accent); }
.journey-item span { font-size: 10px; line-height: 1.2; font-weight: 700; letter-spacing: .8px; }

/* RESPONSIVE TUNING */
@media (min-width: 620px) {
  .intro { padding-top: 48px; }
  .composer-dock { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 700px) {
  .site-header-inner { padding: 24px 20px; }
  /* Match the main homepage, which hides navigation links on narrow screens. */
  .site-nav { display: none; }
}
@media (max-width: 420px) {
  .page { padding-left: 17px; padding-right: 17px; }
  .intro p { font-size: 15px; }
  .bubble { font-size: 14px; }
  .activity-card { padding: 13px; }
  .journey { gap: 6px; }
  .journey-item { padding: 12px 3px 10px; }
  .journey-item span { font-size: 9px; letter-spacing: .4px; }
}


/* LINK STATES — visited links should not change colour or gain decoration. */
a:visited {
  color: inherit;
}
.site-nav a:visited,
.site-nav .field-notes-current:visited {
  color: var(--accent);
}


/* The FDL mobile menu overlay is intentionally defined in ../style.css.
   Keep menu presentation shared across Field Notes and future FDL pages. */

/* FDL LINK STATES — keep links visually consistent */
a:link,
a:visited {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus,
a:active {
  color: var(--accent);
  text-decoration: none;
}

/* Keep white text on blue buttons */
.cta:link,
.cta:visited,
.cta:hover,
.cta:focus,
.cta:active {
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 700px) {
  .page {
    padding-left: 20px;
    padding-right: 20px;
  }
}