/* CSI utility tools: a shared, dependency-free visual foundation.
   Keep the familiar purple for actions; let typography and space do the rest. */
:root {
  --csi-purple: #5865f2;
  --csi-purple-strong: #4652cf;
  --csi-ink: #1a1a1a;
  --csi-paper: #fafafa;
  --csi-muted: #686875;
  --csi-line: #e5e5ed;
  --csi-tint: #eeeefe;
  --primary: var(--csi-purple);
  --primary-dark: var(--csi-purple-strong);
  --bg: var(--csi-paper);
  --text: var(--csi-ink);
  --muted: var(--csi-muted);
  --border: var(--csi-line);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
button, select, input, textarea { transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease; }
nav { width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px 36px; background: transparent; display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px 20px; }
nav a { padding: 8px 0; color: var(--muted); background: transparent; font-size: 14px; font-weight: 500; text-decoration: none; border-radius: 0; }
nav a:hover { color: var(--text); background: transparent; }
nav .brand, .header > a.brand { display: inline-flex; align-items: center; gap: 10px; margin-inline-end: auto; color: var(--text); font-size: 23px; line-height: 1; font-weight: 700; letter-spacing: -.9px; }
.utility-mark { width: 28px; height: 28px; flex-shrink: 0; color: var(--primary); }
.brand-dot { color: var(--primary); }
nav .lang-picker-wrapper { margin-left: 0 !important; margin-inline-start: 8px; }
nav .lang-picker-btn { min-height: 44px; max-width: 100%; border: 1px solid var(--border) !important; border-radius: 24px !important; background: #fff !important; color: var(--text) !important; font-weight: 500 !important; padding: 8px 14px !important; }
.lang-picker-dropdown { border: 1px solid var(--border); box-shadow: 0 8px 30px #1a1a1a0d !important; max-width: calc(100vw - 40px); }
.lang-picker-dropdown button:hover, .lang-picker-dropdown button:focus-visible { background: var(--csi-tint) !important; }
.header { padding: 48px 24px 32px; background: transparent; color: var(--text); text-align: center; }
.header h1 { max-width: 850px; margin: 0 auto; color: var(--text); font-size: clamp(32px, 5vw, 56px); line-height: 1.12; font-weight: 650; letter-spacing: -.045em; text-wrap: balance; }
.header p { max-width: 570px; margin: 18px auto 0; padding: 0; color: var(--muted); font-size: 16px; line-height: 1.65; opacity: 1; }
.header .initiative-statement { max-width: 460px; padding: 0; color: var(--muted); font-size: 15px; }
.utility-home .header { padding-top: 24px; padding-bottom: 24px; }
.utility-home .header h1 { font-size: clamp(48px, 6vw, 68px); }
.header .coffee-link { margin-top: 16px; }
.coffee-link, .initiative-footer .coffee-link { min-height: 44px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 0; background: transparent; color: var(--muted); font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.5; white-space: normal; }
.coffee-link:hover { color: var(--primary-dark); background: var(--csi-tint); border-color: var(--primary); }
.coffee-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 0; font-size: 20px; }
.container { width: 100%; max-width: 760px; padding: 8px 28px 32px; margin: 0 auto; }
.lang-section { display: grid; grid-template-columns: minmax(0,1fr) 44px minmax(0,1fr); align-items: end; gap: 12px; margin: 16px 0 24px; padding: 0; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
.lang-row { display: flex; flex-direction: column; align-items: stretch; min-width: 0; gap: 8px; margin: 0 !important; }
.lang-label { min-width: 0; color: var(--muted); font-size: 13px; font-weight: 400; text-align: center; text-transform: none; letter-spacing: 0; }
select { width: 100%; min-width: 0; min-height: 52px; padding: 12px 36px 12px 18px; border: 1px solid var(--border); border-radius: 28px; background-color: #fff; color: var(--text); font-size: 16px; font-weight: 500; }
[dir="rtl"] select { padding-inline: 18px 36px; background-position: left 16px center; }
.swap-btn { width: 44px; height: 52px; margin: 0; border: 0; background: transparent; color: var(--primary); font-size: 24px; border-radius: 12px; }
.swap-btn:hover { background: var(--csi-tint); transform: none; }
.role-row { gap: 6px; padding: 5px; margin: 0 auto 32px; max-width: 420px; border: 1px solid var(--border); border-radius: 16px; background: #f0f0f4; }
.role-btn { min-width: 0; min-height: 44px; padding: 9px 12px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 15px; font-weight: 500; }
.role-btn.active { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 4px #1a1a1a08; }
.nego-section, .custom-input, .recent-section, .content-card, .travel-summary { margin: 0 0 32px; padding: 24px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; background: transparent; }
.nego-section h2, .custom-input .section-title, .recent-section h2, .content-card h2, .travel-summary h2 { margin: 0 0 20px; color: var(--text); font-size: 23px; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; text-align: start; }
.nego-inputs { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.nego-field { min-width: 0; }
.price-formatted { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.nego-field label, .tone-control label { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.nego-field input { border: 1px solid var(--border); border-radius: 12px; min-height: 52px; padding: 12px; font-size: 18px; }
.currency-mode { justify-content: flex-start; gap: 12px; }
.currency-mode-option { padding: 6px 0; border: 0; background: transparent; }
.currency-hint, .tone-help { text-align: start; font-size: 12px; }
.tone-control { margin: 16px 0; }
.tone-control select { border-radius: 12px; }
.nego-generate-btn, .translate-btn, .feedback-form button { min-height: 56px; padding: 14px 24px; border-radius: 16px; background: var(--primary); color: #fff; font-size: 16px; font-weight: 600; box-shadow: 0 4px 14px #5865f210; }
.nego-generate-btn:hover, .translate-btn:hover, .feedback-form button:hover { background: var(--primary-dark); }
.custom-input textarea, .feedback-form input, .feedback-form textarea { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); font-size: 16px; }
.custom-input textarea { min-height: 112px; }
.feedback-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 20px; }
.feedback-form input, .feedback-form textarea { display: block; width: 100%; min-width: 0; }
.feedback-form textarea { min-height: 140px; resize: vertical; }
.feedback-trap[hidden] { display: none !important; }
.feedback-form button { border: 0; cursor: pointer; }
.feedback-form button:disabled { opacity: .6; cursor: not-allowed; }
.feedback-form label { font-size: 14px; font-weight: 500; }
.feedback-form button { justify-self: stretch; }
.currency-control { display: grid; gap: 6px; margin-bottom: 10px; }
.currency-control label { color: var(--muted); font-size: 13px; font-weight: 500; }
.currency-control select { border-radius: 12px; }
body button, body .coffee-link, body .role-btn, body .cta-box a { font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important; font-weight: 600; letter-spacing: -.02em; }
.phrase-card, .nego-card, .recent-item, .phrase-box { border: 1px solid var(--border); border-radius: 16px; box-shadow: none; background: #fff; }
.phrase-card:hover { border-color: var(--primary); box-shadow: none; transform: none; }
.custom-result { border: 1px solid var(--border); border-radius: 16px; background: #fff; }
.travel-summary h2 { font-size: 20px; }
.travel-summary p { color: var(--muted); font-size: 15px; }
.footer, .initiative-footer, body > footer { background: transparent; color: var(--muted); }
.footer { max-width: 920px; margin: 32px auto 0; padding: 32px 24px; border-top: 1px solid var(--border); font-size: 13px; }
.footer a, body > footer a { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; margin: 0; }
.initiative-statement { color: var(--muted); }
.initiative-footer { padding: 16px 0 0; }
.guide-grid { gap: 0 28px; }
.guide-card { padding: 24px 0; background: transparent; border: 0; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
.guide-card:hover { transform: none; box-shadow: none; border-color: var(--primary); }
.guide-card h3, .section-label { color: var(--text); }
.guide-card .tag { background: var(--csi-tint); color: var(--primary-dark); }
.cta-box, .quick-answer { background: var(--csi-tint); color: var(--text); border: 0; border-radius: 16px; box-shadow: none; }
.cta-box h3, .quick-answer h2 { color: var(--text); }
.cta-box a { background: var(--primary); color: #fff; border-radius: 12px; }
.article { width: 100%; max-width: 760px; padding: 32px 28px; }
.article h1 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -.04em; line-height: 1.2; }
.article h2 { color: var(--text); }
.features { gap: 24px; }
.feature { background: transparent; border-radius: 0; box-shadow: none; padding: 16px 0; }
body > main:not(.container):not(.article) { max-width: 760px; margin-inline: auto; }
.copied-toast { width: max-content; max-width: calc(100vw - 32px); text-align: center; opacity: 0; visibility: hidden; }
.copied-toast.show { opacity: 1; visibility: visible; }
@media (max-width: 600px) {
  nav { padding: 16px 20px; gap: 4px 18px; }
  nav .brand { flex: 1; }
  nav .lang-picker-wrapper { order: 1; margin-inline-start: auto; }
  nav > a:not(.brand) { order: 2; font-size: 13px; }
  nav::after { content: ""; order: 1; flex-basis: 100%; }
  .header { padding: 32px 24px 24px; }
  .utility-home .header { padding-top: 24px; }
  .header .initiative-statement { font-size: 14px; max-width: 340px; }
  .container, .article { padding-inline: 20px; }
  .lang-section { gap: 6px; grid-template-columns: minmax(0,1fr) 32px minmax(0,1fr); }
  .lang-section select { padding-inline-start: 12px; padding-inline-end: 25px; background-position: right 10px center; font-size: 16px; }
  [dir="rtl"] .lang-section select { background-position: left 10px center; }
  .swap-btn { width: 32px; }
  .nego-inputs { gap: 8px; }
  .nego-field label { min-height: 38px; line-height: 1.5; }
  .nego-field input { padding: 10px; font-size: 16px; }
  .role-row { margin-bottom: 24px; }
  .nego-section h2, .custom-input .section-title { font-size: 21px; }
}
@media (max-width: 359px) {
  .nego-inputs { grid-template-columns: 1fr; }
  .nego-field label { min-height: 0; }
  nav { gap: 4px 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .utility-home .header { animation: utility-enter 260ms ease-out; }
  @keyframes utility-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
