/* The Mint Dictionary: shared by the homepage "Speak mint" section and /dictionary. */
:root { --dk-ink: #0c1511; --dk-paper: #f3f6f2; --dk-mint: #35d38f; }

/* Typing caret */
.caret { display: inline-block; width: .5em; height: 1.05em; margin-left: 3px; border-radius: 2px; background: currentColor; vertical-align: -.14em; animation: dk-blink 1.05s steps(1) infinite; }
@keyframes dk-blink { 50% { opacity: 0; } }

/* Hero greeting chip (homepage) */
.hello { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; min-height: 40px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(53,211,143,.1); border: 1px solid rgba(53,211,143,.35); color: var(--dk-mint); font-family: var(--mono); font-size: .95rem; font-weight: 600; text-decoration: none; transition: background .2s, border-color .2s; max-width: 100%; }
.hello:hover { background: rgba(53,211,143,.18); border-color: rgba(53,211,143,.65); }
.hello-leaf { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(53,211,143,.16); }
.hello-leaf svg { width: 19px; height: 19px; transform-origin: 50% 85%; animation: dk-wave 3.2s ease-in-out infinite; }
@keyframes dk-wave { 0%, 55%, 100% { transform: rotate(0); } 8% { transform: rotate(16deg); } 16% { transform: rotate(-10deg); } 24% { transform: rotate(14deg); } 32% { transform: rotate(-6deg); } 40% { transform: rotate(8deg); } }
.hello-say { white-space: nowrap; overflow: hidden; text-overflow: clip; }
.hello .caret { width: .45em; height: 1.1em; }
.hello-go { margin-left: 4px; color: rgba(243,246,242,.5); font-family: var(--sans); font-weight: 500; font-size: .85rem; white-space: nowrap; }

/* Stage: typed phrase + hashtag + post */
.slang-stage { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 20px; align-items: stretch; margin-bottom: 24px; }
@media (max-width: 900px) { .slang-stage { grid-template-columns: 1fr; } }
.say-box { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; min-height: 340px; padding: clamp(24px, 4vw, 44px); border-radius: 28px; color: var(--dk-paper); background: radial-gradient(80% 120% at 100% 0%, rgba(53,211,143,.3) 0%, transparent 60%), radial-gradient(60% 90% at 0% 100%, rgba(22,184,119,.16) 0%, transparent 60%), linear-gradient(160deg, #133528 0%, var(--dk-ink) 72%); }
.say-box::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 34px 34px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%); mask-image: linear-gradient(180deg, #000, transparent 90%); pointer-events: none; }
.say-box > * { position: relative; }
.say-mark { position: absolute; right: -40px; bottom: -50px; width: 300px; height: 300px; opacity: .07; pointer-events: none; }
.say-label { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: .76rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(243,246,242,.62); }
.say-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--dk-mint); box-shadow: 0 0 0 0 rgba(53,211,143,.6); animation: dk-pulse 2s ease-out infinite; }
@keyframes dk-pulse { 0% { box-shadow: 0 0 0 0 rgba(53,211,143,.55); } 100% { box-shadow: 0 0 0 12px rgba(53,211,143,0); } }
.say-text { min-height: calc(2.06 * clamp(2.3rem, 5.6vw, 4.6rem) + 3.1em); }
.say-line { margin: 0; font-size: clamp(2.3rem, 5.6vw, 4.6rem); font-weight: 800; line-height: 1.03; letter-spacing: -.045em; color: #fff; text-wrap: balance; }
.say-line .caret { width: .07em; height: .86em; margin-left: .06em; color: var(--dk-mint); vertical-align: -.06em; }
.say-tag { margin: 10px 0 0; min-height: 1.5em; font-family: var(--mono); font-size: clamp(1.05rem, 2vw, 1.4rem); font-weight: 600; color: var(--dk-mint); }
.say-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-x { display: inline-flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 999px; background: #fff; color: var(--dk-ink); font-weight: 700; font-size: 1rem; text-decoration: none; transition: background .15s, transform .15s; }
.btn-x svg { width: 17px; height: 17px; }
.btn-x:hover { background: var(--dk-mint); transform: translateY(-1px); }
.btn-copytag { font: inherit; font-weight: 600; font-size: 1rem; padding: 12px 20px; border-radius: 999px; border: 1px solid rgba(255,255,255,.26); background: transparent; color: var(--dk-paper); cursor: pointer; transition: border-color .15s, color .15s; }
.btn-copytag:hover { border-color: rgba(255,255,255,.55); }
.btn-copytag.done { border-color: var(--dk-mint); color: var(--dk-mint); }

/* Word of the day */
.wotd { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 30px 26px 24px; border-radius: 28px; background: var(--card); border: 1px solid var(--rule); box-shadow: 0 30px 60px -42px rgba(16,33,26,.5); }
.wotd-stamp { position: absolute; top: 20px; right: 18px; transform: rotate(5deg); padding: 4px 9px; border: 2px solid var(--stamp); border-radius: 6px; color: var(--stamp); font-family: var(--mono); font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.wotd-date { margin: 0; padding-right: 130px; font-family: var(--mono); font-size: .78rem; color: var(--ink-2); }
.wotd-word { margin: 10px 0 0; font-size: clamp(2.3rem, 4.2vw, 3.2rem); line-height: 1; letter-spacing: -.045em; }
.wotd-word a { color: var(--ink); text-decoration: none; }
.wotd-word a:hover { text-decoration: underline; text-decoration-color: var(--mint); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.wotd-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: .86rem; color: var(--ink-2); }
.wotd-meta span:first-child { font-family: var(--mono); }
.wotd-meta span:last-child { font-style: italic; }
.wotd-def { margin: 8px 0 0; font-size: 1.06rem; line-height: 1.5; color: var(--ink); }
.wotd-ex { margin: 0 0 12px; padding-left: 12px; border-left: 3px solid var(--mint); font-style: italic; color: var(--ink-2); }
.wotd-ex::before, .entry-ex::before { content: "“"; }
.wotd-ex::after, .entry-ex::after { content: "”"; }
.wotd .tag-post { margin-top: auto; align-self: flex-start; }

/* Entries */
.dict { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .dict { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .dict { grid-template-columns: 1fr; }
  /* Homepage: featured words become a swipeable row on phones */
  .slang .dict { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 6px 20px 14px; scroll-padding: 0 20px; scrollbar-width: none; }
  .slang .dict::-webkit-scrollbar { display: none; }
  .slang .dict .entry { scroll-snap-align: start; }
  .slang .dict .entry:hover { transform: none; }
}
.entry { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 22px 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--rule); scroll-margin-top: 110px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.entry:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -30px rgba(16,33,26,.45); }
.entry:target, .entry.hit { border-color: var(--mint); box-shadow: 0 0 0 4px var(--mint-soft), 0 22px 44px -30px rgba(16,33,26,.45); }
.entry-tab { position: absolute; top: -1px; right: 20px; min-width: 26px; padding: 5px 7px 7px; border-radius: 0 0 8px 8px; background: var(--mint-soft); color: var(--mint-deep); font-family: var(--mono); font-size: .74rem; font-weight: 700; text-align: center; }
.entry-word { margin: 0; padding-right: 36px; font-size: 1.6rem; line-height: 1.08; letter-spacing: -.035em; }
.entry-word a { color: var(--ink); text-decoration: none; }
.entry-word a:hover { text-decoration: underline; text-decoration-color: var(--mint); text-underline-offset: 4px; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0; font-size: .82rem; color: var(--ink-2); }
.entry-say { font-family: var(--mono); }
.entry-pos { font-style: italic; }
.entry-senses { margin: 6px 0 0; padding-left: 1.3em; font-size: .96rem; line-height: 1.5; color: var(--ink); }
.entry-senses li + li { margin-top: 4px; }
.entry-senses li::marker { font-family: var(--mono); font-weight: 600; font-size: .85em; color: var(--mint-deep); }
.entry-ex { margin: 4px 0 0; font-style: italic; font-size: .94rem; color: var(--ink-2); }
.entry-see { margin: 2px 0 0; font-size: .82rem; color: var(--ink-3); }
.entry-see a { color: var(--mint-deep); }
.entry-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.tag-post { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 13px; border-radius: 999px; background: var(--dk-mint); color: var(--dk-ink); font-family: var(--mono); font-size: .84rem; font-weight: 600; text-decoration: none; transition: background .15s; }
.tag-post span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-post svg { flex: none; width: 14px; height: 14px; }
.tag-post:hover { background: #5de3a8; }
.tag-copy { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule); background: var(--card); color: var(--ink-2); cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.tag-copy svg { width: 16px; height: 16px; }
.tag-copy:hover { border-color: var(--ink-3); }
.tag-copy.done { background: var(--mint-soft); border-color: var(--mint); color: var(--mint-deep); }

.dict-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 22px; color: var(--ink-2); }
.dict-foot p { margin: 0; }
.dict-foot a { color: var(--mint-deep); font-weight: 600; }
.dict-open { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: var(--dk-ink); color: var(--dk-paper) !important; font-weight: 700; text-decoration: none; }
.dict-open:hover { background: #1d4a37; }
.tag-copy:focus-visible, .tag-post:focus-visible, .btn-x:focus-visible, .btn-copytag:focus-visible, .dict-open:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* Dark color scheme: the site flips --ink/--paper, so pin the pieces that must stay readable */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dict-open { background: var(--dk-mint); color: var(--dk-ink) !important; }
  :root:not([data-theme="light"]) .dict-open:hover { background: #5de3a8; }
  :root:not([data-theme="light"]) .say-box { box-shadow: inset 0 0 0 1px rgba(53,211,143,.18); }
  :root:not([data-theme="light"]) .wotd, :root:not([data-theme="light"]) .entry:hover { box-shadow: 0 30px 60px -40px rgba(0,0,0,.8); }
}

@media (prefers-reduced-motion: reduce) {
  .caret, .hello-leaf svg, .say-label i { animation: none; }
  .entry, .btn-x { transition: none; }
}
