/* File: grammarly1.css */
/* ============================================================================
   0) THEME TOKENS & GLOBALS
   ========================================================================== */

/* ======================
   Root Variables (Brand)
   ====================== */
:root {
  /* backgrounds */
  --bg-page: #F3F4F6;
  --bg-panel: #ffffff;
  --bg-accent-hover: #E5E7EB;

  /* text */
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-inverse: #ffffff;

  /* borders */
  --border-default: #E5E7EB;

  /* brand colors */
  --brand-primary: #1D4ED8;
  --brand-accent: #3B82F6;
  --brand-used-often-rgb: 232,93,39;

  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Roboto', 'Arial', sans-serif;
}

/* ─────── Dark Theme ─────── */
[data-theme="dark"] {
  --bg-page: #1d1f2f;
  --bg-panel: rgba(31, 35, 55, 0.85);
  --bg-accent-hover: rgba(255,255,255,0.08);

  --text-primary: #f0f0f0;
  --text-secondary: #aaa;
  --text-inverse: #1F2937;

  --border-default: #445;

  --brand-primary: #1f2337;  /* swap if you like a different accent */
  --brand-accent: #3b82f6;
  --brand-used-often-rgb: 232,93,39;
}

/* ============================================================================
   1) RESET & BASE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-primary);
  width: 100%;
  height: 100%;
}
/* Smooth theme transitions for common interactive elements */
html, body, .pane, .editor-area, .tool-page-header,
.text-input, .text-output, .icon-btn, .btn-primary, .btn-secondary {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============================================================================
   2) UTILITY CONTAINERS / HELPERS (non-responsive)
   ========================================================================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* NOTE: there is also a second `.hidden` later with !important; keep both */
.hidden {
  display: none;
}

/* ============================================================================
   3) PAGE HEADER (Title, Subtitle, Theme Toggle wrapper lives in HTML)
   ========================================================================== */
.tool-page-header {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  background-color: var(--bg-page);
  transition: background-color 0.4s ease;
}
.title-section {
  width: 100%;
  display: flex;
  text-align: left;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.tool-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.tool-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================================
   4) MAIN EDITOR LAYOUT (both panes)
   ========================================================================== */
.editor-area {
  padding: 2rem 0;
}
.editor-container {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Pane (shared) */
.pane {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 1rem;
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 477px;
}

/* Left Pane: Editor */
.pane-left {
  flex: 2 1 400px;
}

/* Right Pane: Output */
.pane-right {
  flex: 1 1 600px;
}
.pane-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
}

/* ============================================================================
   5) EDITOR TOOLBAR & CONTROLS
   ========================================================================== */
.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.toolbar-left {
  display: flex;
  gap: 0.5rem;
}
.toolbar-right {
  display: flex;
  gap: 0.5rem;
}

/* Icon buttons (undo/redo/paste/copy) */
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.3rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover {
  background-color: var(--bg-page);
  color: var(--text-primary);
}

/* Secondary button (toolbar) */
.btn-secondary {
  background-color: var(--bg-page);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: background 0.2s, border-color 0.2s;
}
.btn-secondary:hover {
  background-color: var(--brand-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* Paste button style (specific) */
.icon-btn#pasteBtn {
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.icon-btn#pasteBtn:hover {}

/* Output toolbar (right pane top bar) */
.output-toolbar {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 0 0 1rem 0;
}
.output-toolbar .icon-btn#copyBtn {
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 0.3rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
/* Copy & Paste shared hover styles */
.icon-btn#copyBtn,
.icon-btn#pasteBtn {
  background-color: var(--bg-panel);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.icon-btn#copyBtn:hover,
.icon-btn#pasteBtn:hover {
  background-color: var(--bg-accent-hover);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.icon-btn#copyBtn:hover {}

/* Toggle highlights button hover (border emphasis) */
#toggleHighlightsBtn:hover {
  border: 1px solid var(--brand-accent);
}

/* ============================================================================
   6) TEXTAREAS (Input & Output) + EDITOR FOOTER
   ========================================================================== */
/* Input textarea */
.text-input {
  background-color: var(--bg-panel);
  flex: none;
  min-height: 430px;          /* ↑ Increase this value as needed */
  resize: vertical;
  padding: 1rem;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.5;
}
.text-input:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px var(--brand-accent);
}

/* Output textarea */
.text-output {
  flex: none;
  min-height: 433px;          /* ↑ Increase this value as needed */
  resize: vertical;
  padding: 1rem;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-page);
  line-height: 1.5;
}
.text-output:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px var(--brand-accent);
}

/* Editor footer (upload + wordcount + check) */
.editor-footer {
  /* unified control height for label & button */
  --cta-h: 42px;

  display: grid;
  grid-template-columns: 1fr auto;   /* left grows, right hugs content */
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.75rem 0 0 0;
}

/* Left section in footer */
.footer-left {
  display: flex;
  align-items: center;               /* align label + filename on the same baseline */
  gap: 0.75rem;
  min-width: 0;    
}

/* Right wrapper in footer (word count + main CTA) */
.footer-right-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: end; 
}

/* Word count */
.word-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
  margin: 0;    
}

/* Main CTA button keeps the same height as the upload label */
.editor-footer .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: var(--cta-h);
  padding: 0 1.2rem;
  white-space: nowrap;
}

/* Main CTA button (Check Grammar) + spinner */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--brand-primary);
  color: var(--color-white);
  border: none;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-family: var(--font-heading);
  border: 1px solid var(--border-default) ;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  white-space: nowrap;
}
.btn-primary:hover {
  background-color: var(--color-accent);
}
.btn-primary:active {
  transform: scale(0.97);
}
.btn-primary#clearGoals {
  background-color: rgb(233 233 233 / 90%);
  color: black;
}
.btn-primary#clearGoals:hover {
  background-color: rgba(199, 199, 199, 0.9);
}
.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid var(--color-white);
  border-top: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
/* Loading state for CTA */
.btn-primary.loading .btn-text {
  visibility: hidden;
}
.btn-primary.loading .btn-spinner {
  display: inline-block;
}
/* Spinner keyframes */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================================
   7) GOALS OVERLAY (modal-like)
   ========================================================================== */
.goals-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(3px);
  background: rgba(0, 0, 0, 0.2);
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  z-index: 2000;
}
.goals-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  padding: 1.5rem;
  background-color: var(--bg-panel);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
}
.goals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.goals-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
}
.close-goals {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}
.close-goals:hover {
  color: var(--text-primary);
}
.goals-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}
.goals-content label {
  font-size: 0.95rem;
  color: var(--text-primary);
}
.goal-select {
  padding: 0.5rem;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: var(--bg-panel);
  cursor: pointer;
}
.goals-save {
  align-self: flex-end;
}
.goals-actions {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}
.tool-tip-card {
  text-align: center;
  background-color: var(--bg-page);
  padding: 10px 14px;
  margin-top: 15px;
  border-top: 1px solid #333;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.tool-tip-card a {
  color: #4b6cb7;
  text-decoration: underline;
  font-weight: 500;
}

/* ============================================================================
   8) UPLOAD MODAL (global modal for file import)
   ========================================================================== */
.upload-modal { 
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(3px);
}
.upload-modal-content {
  background: var(--bg-panel);
  color: var(--text-primary);
  padding: 30px;
  width: 90%;
  max-width: 500px;
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  text-align: center;
  position: relative;
  font-family: var(--font-body);
  border: 1px solid var(--border-default);
  transition: all 0.3s ease;
}
.close-upload-modal {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 22px;
  font-weight: bold;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}
.close-upload-modal:hover {
  color: var(--brand-accent);
}
.upload-modal-content h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--brand-accent);
}
.drop-area {
  border: 2px dashed var(--brand-accent);
  border-radius: 10px;
  padding: 30px;
  margin: 20px 0;
  cursor: pointer;
  background-color: var(--bg-page);
  transition: all 0.2s ease;
}
.drop-area.hover {
  background-color: var(--bg-accent-hover);
  border-color: rgba(var(--brand-used-often-rgb), 1);
}
.drop-area p {
  margin: 8px 0;
  font-size: 15px;
  color: var(--text-secondary);
}
.upload-label {
  display: inline-flex;
  align-items: center;
  height: var(--cta-h);
  padding: 0 1rem;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-primary, #111);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.upload-label:hover {
  background-color: var(--brand-primary);
}
.upload-instructions p {
  margin: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
}
.file-info {
  max-width: clamp(160px, 30vw, 360px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  line-height: var(--cta-h);
}

/* ============================================================================
   9) FEATURES OVERVIEW (marketing section under editor)
   ========================================================================== */
.features-overview--pro{
  position: relative;
  padding: clamp(2rem, 5vw, 3.2rem) 0;
  background: linear-gradient(180deg, var(--bg-panel), color-mix(in srgb, var(--bg-panel) 75%, transparent));
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  overflow: clip;
  isolation: isolate;
}
/* Decorative background */
.features-overview--pro .features-bg{
  position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(600px 280px at 90% -10%, color-mix(in srgb, var(--brand-accent) 16%, transparent) 0%, transparent 60%),
    radial-gradient(520px 260px at 10% 110%, color-mix(in srgb, rgb(var(--brand-used-often-rgb)) 14%, transparent) 0%, transparent 60%),
    linear-gradient(transparent, transparent);
}
.features-overview--pro .features-bg::after{
  content:""; position:absolute; inset:0; opacity:.08;
  background-image:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--text-primary);
  mix-blend-mode: overlay;
}

.features-heading{
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  text-align:center; margin: 0 0 1.6rem;
  color: var(--text-primary);
  position: relative; display:inline-block; left:50%; transform: translateX(-50%);
}
.features-heading::after{
  content:""; display:block; height: 3px; width: 120px; margin:.6rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-accent), rgb(var(--brand-used-often-rgb)));
  box-shadow: 0 6px 18px color-mix(in srgb, var(--brand-accent) 35%, transparent);
  animation: drawline .9s .15s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes drawline{ from{ transform: scaleX(0); transform-origin: 0 50%; } to{ transform: scaleX(1);} }

.features-grid{
  display:grid; gap: clamp(1rem, 2vw, 1.4rem);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}

/* Feature cards */
.feature-card{
  --ring: linear-gradient(120deg, var(--brand-accent), rgb(var(--brand-used-often-rgb)));
  position: relative;
  display:flex; flex-direction:column; align-items:center; text-align:center;
  padding: 1.25rem 1.2rem 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  background: color-mix(in srgb, var(--bg-page) 85%, transparent);
  box-shadow: 0 10px 28px rgba(15,23,42,.06);
  overflow:hidden;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.feature-card::before{
  content:""; position:absolute; inset:-1px; border-radius: 16px; padding:1px; z-index:0;
  background: var(--ring);
  opacity:.0; transition: opacity .3s ease;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.feature-card::after{
  content:""; position:absolute; inset:-40% -60% auto -60%; height: 200%;
  background: linear-gradient(120deg, rgba(255,255,255,.0) 0%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.0) 100%);
  transform: translateX(-120%) rotate(12deg);
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
  pointer-events:none;
}
.feature-card:hover{ transform: translateY(-6px); box-shadow: 0 18px 50px rgba(15,23,42,.12); }
.feature-card:hover::before{ opacity:.9; }
.feature-card:hover::after{ transform: translateX(10%) rotate(12deg); }

.feature-icon{
  position: relative; z-index:1;
  display:grid; place-items:center; width:48px; height:48px; border-radius: 12px;
  color: #fff;
  background: linear-gradient(120deg, var(--brand-accent), rgb(var(--brand-used-often-rgb)));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--brand-accent) 35%, transparent);
  margin-bottom: .9rem;
  animation: float 5s ease-in-out infinite;
}
@keyframes float{ 0%{transform:translateY(0)} 50%{transform:translateY(-4px)} 100%{transform:translateY(0)} }

.feature-card h4{
  font-family: var(--font-heading);
  font-size: 1.08rem;
  margin: .15rem 0 .45rem;
  color: var(--text-primary);
}
.feature-card p{
  color: var(--text-secondary);
  font-size: .98rem;
  line-height: 1.5;
  margin: 0;
}

/* Staggered entrance animation */
.feature-card{
  opacity: 0; transform: translateY(10px);
  animation: fadeUp .6s ease forwards;
}
.features-grid .feature-card:nth-child(1){ animation-delay: .05s; }
.features-grid .feature-card:nth-child(2){ animation-delay: .1s; }
.features-grid .feature-card:nth-child(3){ animation-delay: .15s; }
.features-grid .feature-card:nth-child(4){ animation-delay: .2s; }
.features-grid .feature-card:nth-child(5){ animation-delay: .25s; }
.features-grid .feature-card:nth-child(6){ animation-delay: .3s; }
.features-grid .feature-card:nth-child(7){ animation-delay: .35s; }
@keyframes fadeUp{ to{ opacity:1; transform: translateY(0);} }

/* Focus accessibility */
.feature-card:focus-within{
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 36%, transparent);
}
.feature-card a:focus-visible{ outline: 2px solid var(--brand-accent); outline-offset: 3px; }

/* ============================================================================
   10) OUTPUT FOOTER + HIGHLIGHT/DIFF STYLES
   ========================================================================== */
.output-footer {
    --cta-h: 42px;
    display: flex;
    align-content: center;
    gap: 0.75rem 1rem;
    padding: 0.75rem 0 0 0;
}
/* Download button (right of highlights toggle) */
.btn-brand {
  color: var(--text-primary);
  background: transparent;
  padding: 10px 18px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  margin-left: 10px;
  transition: background-color 0.3s ease;
}
.btn-brand:hover {
  border: 1px solid var(--brand-accent);
}
/* Toggle highlights button */
.btn-outline {
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--border-default);
  background-color: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease-in-out;
}
.btn-outline.active {
  background-color: var(--color-used-often);
  color: var(--color-white);
  border-color: var(--color-used-often);
}
/* Highlight container */
.highlight-container {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  white-space: pre-wrap;
  padding: 1rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 1rem;
  height: 300px;
  overflow-y: auto;
}
/* Diff tokens */
.diff-added {
  background-color: rgba( var(--brand-used-often-rgb), 0.2 ); /* or define another var */
  color: #0a730a;
  font-weight: bold;
}
.diff-deleted {
  background-color: #ffd6d6;
  color: #c00;
  text-decoration: line-through;
}
.diff-equal {
  color: inherit;
}

/* Utility override (second .hidden wins due to !important; keep after first) */
.hidden {
  display: none !important;
}

/* ============================================================================
   11) STATEFUL UTILITIES
   ========================================================================== */
/* Show mobile menu when active */
.mobile-menu.active {
  display: flex;
}

/* ============================================================================
   12) MEDIA QUERIES (ALL RESPONSIVE + ACCESSIBILITY AT THE END)
   ========================================================================== */

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .feature-card, .feature-card::after, .feature-card::before,
  .feature-icon, .features-heading::after{
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- ≥ 0 to 1024px ---------- */
@media (max-width: 1024px) {
  .editor-container {
    flex-wrap: wrap;
  }
  .pane-left {
    flex: 1 1 100%;
  }
  .pane-right {
    flex: 1 1 100%;
    max-width: 100%;
    margin-top: 1rem;
  }
}

/* ---------- ≥ 0 to 768px ---------- */
@media (max-width: 768px) {
  .tool-page-header {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }
  .title-section {
    align-items: center;
    text-align: center;
  }
  .pane-left { padding-bottom: 1rem; }
  .pane-right { padding-top: 0.5rem; }

  .features-grid {
    grid-template-columns: 1fr; /* Single column on small screens */
  }
  .feature-card { text-align: left; }
}

/* ---------- ≥ 0 to 480px ---------- */
@media (max-width: 480px) {
  .tool-title { font-size: 1.5rem; }
  .tool-subtitle { font-size: 0.9rem; }
  .tool-tip-card { font-size: 12px; }

  .icon-btn#pasteBtn {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
  }

  .editor-footer { flex-wrap: nowrap; }
  .footer-left { align-items: flex-start; }
  .footer-right-wrapper { align-items: flex-end; }

  
  .upload-label { font-size: 0.85rem; }
  .file-info   { font-size: 0.8rem; }
  .word-count  { font-size: 0.85rem; margin-bottom: 0.7rem;}

  .editor-footer .btn-primary {
    font-size: 0.9rem;
    padding: 0 1rem;
  }

  .btn-primary {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
  .btn-primary .btn-text { font-size: 0.75rem; }

  .btn-outline {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  .icon-btn#copyBtn {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
  }
}

/* ---------- ≥ 0 to 320px ---------- */
@media (max-width: 320px) {
  .btn-secondary {
    font-size: 0.75rem;
    padding: 0.5rem 0.2rem;
  }
}
