/* ═══════════════════════════════════════════════════════════
   SOULARY — GOALS & ACHIEVEMENTS PAGE
   Same open diary on a candlelit wooden desk.
   White cards → aged paper. Clean borders → leather binding.
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,600;1,400;1,600&family=IM+Fell+English:ital@0;1&family=Homemade+Apple&display=swap');

/* ─── DESIGN TOKENS ─── */
:root {
  /* Desk */
  --desk-dark:    #1a0f07;
  --desk-mid:     #2c1a0e;
  --desk-grain:   #3d2618;

  /* Leather */
  --leather:      #4e3221;
  --leather-dk:   #2a1a0d;
  --leather-lt:   #6b4d3a;

  /* Paper */
  --paper:        #faf6ea;
  --paper-warm:   #f5f0de;
  --paper-crease: #ede6ce;
  --paper-edge:   #d9d0b4;

  /* Ink */
  --ink:          #0d0905;
  --ink-mid:      #1e1409;
  --ink-fade:     #3d2e1e;
  --ink-ghost:    #5a4a36;

  /* Accents */
  --gold:         #c9a84c;
  --gold-dim:     rgba(201,168,76,0.32);
  --gold-glow:    rgba(201,168,76,0.1);
  --red-wax:      #8b1a1a;
  --red-wax-lt:   #a52020;
  --red-margin:   rgba(185,65,65,0.24);

  /* Ruled lines */
  --rule:         rgba(0,0,0,0.062);
  --rule-h:       34px;

  /* Typography */
--font-hand:    'Poppins', sans-serif;
--font-body:    'Inter', sans-serif;
--font-formal:  'Roboto', sans-serif;
--font-scrawl:  'Open Sans', sans-serif;

  /* Shadows */
  --shadow-page:  0 8px 32px rgba(0,0,0,0.5), 0 24px 64px rgba(0,0,0,0.35);
  --shadow-card:  0 3px 14px rgba(0,0,0,0.09);
  --shadow-lift:  0 10px 28px rgba(0,0,0,0.18);

  /* Legacy vars the original CSS used — remapped to diary palette */
  --soft-pink:      var(--paper-warm);
  --soft-lavender:  var(--paper-crease);
  --soft-yellow:    var(--paper-warm);
  --soft-cream:     var(--paper);
  --text-dark:      var(--ink);
  --text-muted:     var(--ink-fade);
  --primary-gradient: linear-gradient(135deg, var(--red-wax-lt), var(--red-wax));
}

/* ─── INK PEN CURSOR ─── */
html, body, * {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2232%22%20height%3D%2232%22%20viewBox%3D%220%200%2032%2032%22%3E%3Crect%20x%3D%2210%22%20y%3D%222%22%20width%3D%2210%22%20height%3D%2220%22%20rx%3D%223%22%20ry%3D%223%22%20transform%3D%22rotate%2845%2015%2012%29%22%20fill%3D%22%232a1a0d%22%20stroke%3D%22%234e3221%22%20stroke-width%3D%220.6%22%2F%3E%3Crect%20x%3D%2211.5%22%20y%3D%223%22%20width%3D%223%22%20height%3D%2216%22%20rx%3D%221.5%22%20transform%3D%22rotate%2845%2015%2012%29%22%20fill%3D%22rgba%28255%2C255%2C255%2C0.12%29%22%2F%3E%3Crect%20x%3D%2210%22%20y%3D%2219.5%22%20width%3D%2210%22%20height%3D%222.5%22%20transform%3D%22rotate%2845%2015%2012%29%22%20fill%3D%22%23c9a84c%22%2F%3E%3Cpolygon%20points%3D%225%2C27%2012%2C20%208%2C16%202%2C30%22%20fill%3D%22%23c9a84c%22%20stroke%3D%22%239a7a28%22%20stroke-width%3D%220.5%22%2F%3E%3Cline%20x1%3D%223.5%22%20y1%3D%2228.5%22%20x2%3D%2210%22%20y2%3D%2218.5%22%20stroke%3D%22%239a7a28%22%20stroke-width%3D%220.7%22%20opacity%3D%220.8%22%2F%3E%3Ccircle%20cx%3D%222.5%22%20cy%3D%2229.5%22%20r%3D%221.2%22%20fill%3D%22%231c1209%22%20opacity%3D%220.85%22%2F%3E%3C%2Fsvg%3E") 2 30, crosshair !important;
}

/* ─── RESET ─── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

/* ═══════════════════════════════════════════════════════════
   BODY — same candlelit wooden desk as index
═══════════════════════════════════════════════════════════ */
body {
  min-height: 100vh;
  background: var(--desk-dark);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  overflow-x: hidden;
  position: relative;
}

/* Wood grain desk */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%,   rgba(255,210,120,0.07) 0%, transparent 52%),
    radial-gradient(ellipse at 80% 85%,  rgba(0,0,0,0.45) 0%,       transparent 55%),
    repeating-linear-gradient(
      92deg,
      transparent 0px, transparent 36px,
      rgba(0,0,0,0.07) 36px, rgba(0,0,0,0.07) 38px,
      transparent 38px, transparent 76px,
      rgba(255,255,255,0.012) 76px, rgba(255,255,255,0.012) 78px
    ),
    repeating-linear-gradient(
      180deg,
      var(--desk-mid)   0px, var(--desk-mid)   4px,
      var(--desk-grain) 4px, var(--desk-grain)  5px,
      var(--desk-mid)   5px, var(--desk-mid)   20px,
      rgba(0,0,0,0.18) 20px, rgba(0,0,0,0.18) 22px
    );
  z-index: 0;
  pointer-events: none;
}

/* Deep vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 70% at 50% 42%, transparent 28%, rgba(0,0,0,0.7) 100%);
  z-index: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   PAGE WRAPPER — the open diary book
═══════════════════════════════════════════════════════════ */
body > *:not(style):not(script) {
  position: relative;
  z-index: 10;
}

/* The top-level wrapper element (whatever class wraps everything) */
/* We target the first meaningful container generically */
body > div,
.page-wrapper,
.goals-page,
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 80px;
  position: relative;
  z-index: 10;
  animation: bookOpen 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bookOpen {
  from { opacity: 0; transform: perspective(1400px) rotateX(5deg) scale(0.97); }
  to   { opacity: 1; transform: perspective(1400px) rotateX(0deg) scale(1);    }
}

/* Leather top cover strip */
body > div::before,
.page-wrapper::before,
.goals-page::before,
.container::before {
  content: '';
  display: block;
  height: 18px;
  background: linear-gradient(to bottom, #1a0d05, var(--leather-dk));
  border-radius: 4px 4px 0 0;
  box-shadow: 0 -3px 14px rgba(0,0,0,0.5);
  margin-top: 40px;
}

/* Leather bottom cover strip */
body > div::after,
.page-wrapper::after,
.goals-page::after,
.container::after {
  content: '';
  display: block;
  height: 18px;
  background: linear-gradient(to top, #1a0d05, var(--leather-dk));
  border-radius: 0 0 4px 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  margin-bottom: 44px;
}

/* ═══════════════════════════════════════════════════════════
   SHARED PAPER SURFACE MIXIN
   Applied to header, all cards, sections
═══════════════════════════════════════════════════════════ */

/* Paper texture helper — attached via ::before */
header,
.achievements-card,
.section,
.goal-card,
.achievement-card {
  position: relative;
  overflow: hidden;
}

header::before,
.achievements-card::before,
.section::before,
.goal-card::before,
.achievement-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

/* Ruled lines helper — attached via ::after */
header::after,
.achievements-card::after,
.section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px,
    transparent calc(var(--rule-h) - 1px),
    var(--rule) calc(var(--rule-h) - 1px),
    var(--rule) var(--rule-h)
  );
  pointer-events: none;
  z-index: 0;
}

/* All children above texture overlays */
header > *,
.achievements-card > *,
.section > *,
.goal-card > *,
.achievement-card > * {
  position: relative;
  z-index: 2;
}

/* ═══════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════ */
header {
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
  padding: 20px 52px 20px 52px;
  border-left: 10px solid var(--leather);
  box-shadow:
    inset 52px 0 0 -50px var(--red-margin),
    0 6px 28px rgba(0,0,0,0.5),
    0 2px 8px rgba(0,0,0,0.3);
}

/* ─── LOGO ─── */
.logo {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 34px;
  font-weight: 400;
  /* Override the transparent gradient clip — use solid ink */
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  color: var(--ink) !important;
  filter: none;
  letter-spacing: -0.5px;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.new-entry-btn,
.add-goal-btn,
.btn-update {
  background: radial-gradient(ellipse at 40% 30%, var(--red-wax-lt), var(--red-wax));
  color: #faf3e0;
  border: none;
  padding: 10px 22px;
  border-radius: 50px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.2px;
  box-shadow: 0 4px 14px rgba(139,26,26,0.38), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.new-entry-btn::after,
.add-goal-btn::after,
.btn-update::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.14) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.new-entry-btn:hover::after,
.add-goal-btn:hover::after,
.btn-update:hover::after { transform: translateX(100%); }

.new-entry-btn:hover,
.add-goal-btn:hover,
.btn-update:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 26px rgba(139,26,26,0.48);
}

.btn-delete-goal {
  background: transparent;
  color: var(--ink-ghost); font-weight: 600;
  border: 1.5px dashed var(--paper-edge);
  padding: 7px 16px;
  border-radius: 50px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-weight: 600;
  font-size: 16px;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.btn-delete-goal:hover {
  background: rgba(139,26,26,0.06);
  border-color: var(--red-wax);
  color: var(--red-wax);
}

/* ═══════════════════════════════════════════════════════════
   SEARCH BAR — transparent, on ruled paper
═══════════════════════════════════════════════════════════ */
.search-container {
  position: relative;
  margin-bottom: 0;
  background: var(--paper);
  border-left: 10px solid var(--leather);
  padding: 18px 52px 18px 52px;
  box-shadow: 0 3px 16px rgba(0,0,0,0.35);
  overflow: hidden;
}

/* Ruled lines behind search */
.search-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent calc(var(--rule-h) - 1px),
    var(--rule) calc(var(--rule-h) - 1px), var(--rule) var(--rule-h)
  );
  pointer-events: none;
  z-index: 0;
}

/* Paper grain */
.search-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}

.search-container > * { position: relative; z-index: 2; }

.search-bar {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: none;
  border-bottom: 1.5px solid var(--paper-edge);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  transition: border-color 0.3s;
}

.search-bar:focus {
  outline: none;
  border-bottom-color: var(--gold);
  box-shadow: none;
  background: transparent;
}

.search-bar::placeholder {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-ghost); font-weight: 600;
  opacity: 0.7;
}

.search-icon {
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  opacity: 0.35;
  z-index: 3;
  color: var(--ink-fade);
}

/* ═══════════════════════════════════════════════════════════
   ACHIEVEMENTS CARD — top summary block
═══════════════════════════════════════════════════════════ */
.achievements-card {
  background: var(--paper);
  border-left: 10px solid var(--leather);
  border-radius: 0;
  box-shadow:
    inset 52px 0 0 -50px var(--red-margin),
    0 4px 20px rgba(0,0,0,0.38);
  border: none;
  padding: 36px 52px 36px 52px;
  margin-bottom: 0;
  transition: none;
}

.achievements-card:hover {
  transform: none;
  box-shadow:
    inset 52px 0 0 -50px var(--red-margin),
    0 4px 20px rgba(0,0,0,0.38);
}

.achievements-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--paper-edge);
}

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(201,168,76,0.12);
  border: 1.5px solid var(--gold-dim);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  color: var(--gold);
  flex-shrink: 0;
}

.achievements-title h2 {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
}

.achievements-subtitle {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-ghost); font-weight: 600;
  margin-top: 3px;
}

/* Stats row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  text-align: center;
  border: 1px solid var(--paper-edge);
  border-radius: 3px;
  overflow: hidden;
  background: var(--paper-warm);
}

.stat-item {
  padding: 22px 16px;
  border-right: 1px solid var(--paper-edge);
  position: relative;
}
.stat-item:last-child { border-right: none; }

/* Faint ruled lines inside stat cells */
.stat-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent 28px,
    rgba(0,0,0,0.04) 28px, rgba(0,0,0,0.04) 29px
  );
  pointer-events: none;
}

.stat-item > * { position: relative; z-index: 2; }

.stat-item h3 {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 46px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 12px;
  color: var(--ink-mid); font-weight: 600;
  text-transform: none;
  letter-spacing: 0.3px;
  font-weight: 400;
}

/* ═══════════════════════════════════════════════════════════
   CONTENT GRID
═══════════════════════════════════════════════════════════ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2px; /* tiny gap = spine between two pages */
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════
   SECTIONS — left & right diary pages
═══════════════════════════════════════════════════════════ */
.section {
  background: var(--paper);
  border-left: 10px solid var(--leather);
  border-radius: 0;
  padding: 36px 36px 36px 52px;
  box-shadow:
    inset 52px 0 0 -50px var(--red-margin),
    0 4px 20px rgba(0,0,0,0.35);
  border: none;
  margin-bottom: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--paper-edge);
}

.section-title {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
}

/* ═══════════════════════════════════════════════════════════
   GOAL CARDS — like sticky notes / folded pages
═══════════════════════════════════════════════════════════ */
.goal-card {
  background: var(--paper-warm);
  border: 1px solid var(--paper-edge);
  border-left: 4px solid var(--gold-dim);
  border-radius: 3px;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.28s;
}

.goal-card:hover {
  transform: translateX(6px) rotate(0.2deg);
  box-shadow: var(--shadow-lift);
  border-left-color: var(--gold);
}

/* Ruled lines in goal card */
.goal-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent 27px,
    rgba(0,0,0,0.04) 27px, rgba(0,0,0,0.04) 28px
  );
  pointer-events: none;
  z-index: 0;
}

.goal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

body {
  font-size: 20px;
}

/* Ensure all interactive elements inherit the larger font size */
input, 
textarea, 
button, 
select {
  font-family: inherit;
  font-size: 18px; /* Larger font for inputs and buttons */
}

/* Larger placeholder text for better clarity */
::placeholder {
  font-size: 18px;
  opacity: 0.7;
}

/* Larger placeholder text for better clarity */
::placeholder {
  font-size: 18px;
  opacity: 0.7;
}
.goal-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}

.goal-tag {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.3px;
  color: var(--ink-ghost); font-weight: 600;
  background: none;
  padding: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--paper-edge);
  display: inline-block;
  margin-bottom: 4px;
}

.goal-title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.goal-description {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.65;
}

/* ─── PROGRESS BAR — like a hand-drawn underline ─── */
.progress-bar {
  background: var(--paper-crease);
  height: 6px;
  border-radius: 0;
  overflow: hidden;
  margin: 14px 0 6px;
  border: none;
  border-bottom: 1px solid var(--paper-edge);
  position: relative;
}

/* Tick marks on the progress track */
.progress-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0px, transparent 24px,
    rgba(0,0,0,0.06) 24px, rgba(0,0,0,0.06) 25px
  );
  z-index: 1;
}

.progress-fill {
  background: linear-gradient(90deg, var(--gold) 0%, #a8842e 100%);
  height: 100%;
  border-radius: 0;
  position: relative;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Ink drip at progress end */
.progress-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -2px;
  width: 3px;
  height: 10px;
  background: var(--gold);
  border-radius: 0 0 2px 2px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-mid); font-weight: 600;
  font-weight: 500;
}

/* Goal card buttons row */
.goal-card .button-row,
.goal-card > .btn-delete-goal {
  margin-top: 14px;
}

/* ═══════════════════════════════════════════════════════════
   ACHIEVEMENT CARDS — like stamps / pasted clippings
═══════════════════════════════════════════════════════════ */
.achievement-card {
  background: var(--paper-warm);
  border: 1px solid var(--paper-edge);
  border-left: 3px solid var(--gold-dim);
  border-radius: 3px;
  padding: 16px 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.28s;
}

.achievement-card:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-lift);
  border-left-color: var(--gold);
}

/* Ruled lines in achievement card */
.achievement-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    transparent 0px, transparent 27px,
    rgba(0,0,0,0.04) 27px, rgba(0,0,0,0.04) 28px
  );
  pointer-events: none;
  z-index: 0;
}

.achievement-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(201,168,76,0.1);
  border: 1.5px solid var(--gold-dim);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

/* Colour variants — keep as paper tints */
.achievement-icon.pink   { background: rgba(139,26,26,0.07);  border-color: rgba(139,26,26,0.2); }
.achievement-icon.orange { background: rgba(201,168,76,0.12); border-color: var(--gold-dim); }
.achievement-icon.purple { background: rgba(78,50,33,0.08);   border-color: rgba(78,50,33,0.2); }

.achievement-title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.achievement-description {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 12px;
  color: var(--ink-mid);
  line-height: 1.55;
}

.achievement-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.meta-tag {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 14px;
  font-weight: 400;
  padding: 2px 8px;
  background: var(--paper-crease);
  color: var(--ink-mid); font-weight: 600;
  border-radius: 0;
  border: 1px solid var(--paper-edge);
  text-transform: none;
  letter-spacing: 0;
}

.trophy-icon {
  margin-left: auto;
  font-size: 22px;
  opacity: 0.18;
  filter: sepia(1);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   EMPTY / MISCELLANEOUS
═══════════════════════════════════════════════════════════ */
.empty-message {
  font-family: var(--font-formal);
  font-weight: 600;
  font-style: italic;
  font-size: 15px;
  color: var(--ink-ghost); font-weight: 600;
  padding: 16px 0;
  text-align: center;
  border-top: 1px dashed var(--paper-edge);
  border-bottom: 1px dashed var(--paper-edge);
}

/* ═══════════════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--desk-dark); }
::-webkit-scrollbar-thumb { background: var(--leather); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--leather-lt); }

/* ═══════════════════════════════════════════════════════════
   STAGGERED REVEAL ANIMATIONS
═══════════════════════════════════════════════════════════ */
header            { animation: inkDry 0.6s ease both 0.1s; }
.search-container { animation: inkDry 0.6s ease both 0.2s; }
.achievements-card{ animation: inkDry 0.6s ease both 0.3s; }
.content-grid     { animation: inkDry 0.6s ease both 0.42s; }

.goal-card:nth-child(1)       { animation: inkDry 0.5s ease both 0.5s; }
.goal-card:nth-child(2)       { animation: inkDry 0.5s ease both 0.62s; }
.goal-card:nth-child(3)       { animation: inkDry 0.5s ease both 0.74s; }
.achievement-card:nth-child(1){ animation: inkDry 0.5s ease both 0.52s; }
.achievement-card:nth-child(2){ animation: inkDry 0.5s ease both 0.64s; }
.achievement-card:nth-child(3){ animation: inkDry 0.5s ease both 0.76s; }

@keyframes inkDry {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 800px) {
  .content-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  header { padding: 16px 24px; flex-wrap: wrap; gap: 12px; }
  .search-container { padding: 14px 24px; }
  .achievements-card { padding: 28px 24px 28px 36px; border-left-width: 6px; }
  .section { padding: 28px 24px 28px 36px; border-left-width: 6px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--paper-edge); }
  .stat-item:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
  body > div::before,
  .container::before { margin-top: 20px; }

  header { flex-direction: column; align-items: flex-start; }
  .logo  { font-size: 28px; }

  .achievements-card,
  .section { padding: 22px 18px 22px 28px; border-left-width: 5px; }

  .stat-item h3 { font-size: 36px; }
  .achievement-card { flex-wrap: wrap; }
  .trophy-icon { display: none; }
}


/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY OVERRIDE — Bold, Dark, High Contrast
   Every word must be readable without effort.
═══════════════════════════════════════════════════════════ */

/* ─── Global ink darkness — override tokens at source ─── */
:root {
  --ink:       #0d0905 !important;   /* near-black warm ink */
  --ink-mid:   #1e1409 !important;   /* dark brown-black */
  --ink-fade:  #2e2214 !important;   /* formerly ghost-grey — now deep brown */
  --ink-ghost: #4a3828 !important;   /* formerly barely visible — now readable */
  --ink-deep:  #0d0905 !important;
}

/* ─── Every text element gets minimum legibility ─── */
body, p, span, div, li, td, th, label, input, textarea, select, button, a {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Caveat handwriting — always bold */
[style*="Caveat"],
.nav-text, .nav-link, .tally-value, .stat-value,
.entry-title, .entry-row-title, .goal-title,
.achievement-title, .section-title, .section-heading,
.feature-content h3, .shortcut-label,
.greeting-name, .profile-inkcard-name,
.form-title, .diary-title, .journal-entry-title,
.write-now-btn, .new-entry-btn, .edit-btn, .logout-scrawl,
.btn-save, .btn-cancel, .btn-add-budget, .btn-add-row, .seal-text,
.text-input, .textarea-large, .date-input, .modern-input, .search-bar {
  font-weight: 700 !important;
  color: var(--ink) !important;
}

/* IM Fell English formal — bump weight & darken */
.section-subtitle, .entry-date, .entry-row-date,
.entry-row-preview, .entry-content,
.tally-label, .tally-footer, .tally-heading,
.form-subtitle, .diary-date-stamp, .greeting-tagline,
.goal-description, .achievement-description, .goal-tag,
.quote-author, .voice-status, .stat-label, .achievements-subtitle,
.intro-text, .pdt-key, .progress-info,
.input-line label, .form-group label, .mood-section label,
.nav-section-label, .embossed-logo, .signup-prompt {
  font-weight: 600 !important;
  color: var(--ink-mid) !important;
  opacity: 1 !important;
}

/* Lora serif — readable weight */
.profile-details p, .quote-text, .inspiration-quote,
.feature-content p, .shortcut-sub {
  font-weight: 600 !important;
  color: var(--ink-mid) !important;
  opacity: 1 !important;
}

/* Entry previews & descriptions — ensure full readability */
.entry-content, .entry-row-preview, .goal-description,
.achievement-description, .inspiration-quote {
  color: var(--ink-mid) !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

/* Ghost elements that still need to look slightly secondary — but still readable */
.page-number, .spine-title, .meta-tag, .trophy-icon {
  opacity: 0.6 !important;
  font-weight: 600 !important;
}

/* Input placeholders — visible guidetext */
input::placeholder,
textarea::placeholder {
  color: var(--ink-ghost) !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}

/* Labels — maximum weight */
label {
  font-weight: 700 !important;
  color: var(--ink-mid) !important;
}