/* -----------------------------------------------------------
   GLOBAL RESET
----------------------------------------------------------- */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      }
      
      /* -----------------------------------------------------------
	 LAYOUT
      ----------------------------------------------------------- */
      body {
	background: linear-gradient(180deg, #f7f9fc 0%, #eef2f7 100%);
	color: #222;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	padding: 40px 20px;
      }
      
      .container {
	max-width: 820px;
	width: 100%;
	background: #fff;
	border-radius: 16px;
	padding: 36px 40px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.06);
	transition: box-shadow 0.3s ease;
      }
      .container:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.06); } /* steady hover */
      
      /* -----------------------------------------------------------
	 HEADINGS & TEXT
      ----------------------------------------------------------- */
      h1 {
	font-size: 2rem;
	font-weight: 600;
	color: #0b3d91;
	text-align: center;
	margin-bottom: 10px;
	letter-spacing: -0.3px;
      }
      
      .subtitle {
	text-align: center;
	font-size: 1rem;
	color: #555;
	margin-bottom: 24px;
	line-height: 1.5;
      }
      
      .note {
	display: block;
	font-size: 0.85rem;
	color: #777;
	margin-top: 6px;
      }
      
      /* -----------------------------------------------------------
	 TEXTAREA
      ----------------------------------------------------------- */
      textarea {
	width: 100%;
	height: 120px;
	resize: vertical;
	padding: 12px 14px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	font-size: 1rem;
	line-height: 1.4;
	margin-bottom: 18px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
      }
      textarea:focus {
	outline: none;
	border-color: #0b3d91;
	box-shadow: 0 0 0 3px rgba(11,61,145,0.15);
      }
      
      /* -----------------------------------------------------------
	 CONTROLS
      ----------------------------------------------------------- */
      .controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	margin-bottom: 24px;
	gap: 12px;
      }
      .controls label { font-weight: 500; margin-right: 6px; }
      .controls select,
      .controls input[type="number"] {
	padding: 8px 10px;
	border-radius: 8px;
	border: 1px solid #ccc;
	font-size: 0.95rem;
	transition: border-color 0.2s ease;
      }
      .controls select:focus,
      .controls input[type="number"]:focus {
	border-color: #0b3d91;
	outline: none;
      }
      
      /* -----------------------------------------------------------
	 BUTTONS
      ----------------------------------------------------------- */
      button {
	padding: 10px 20px;
	border: none;
	border-radius: 10px;
	background-color: #0b3d91;
	color: #fff;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.25s ease, transform 0.1s ease;
	font-weight: 500;
      }
      button:hover:not(:disabled) { background-color: #1553c4; transform: translateY(-1px); }
      button:active { transform: translateY(0); }
      button:disabled { opacity: 0.6; cursor: not-allowed; }
      
      /* Auth row buttons use .btn classes */
      .btn { padding: 8px 14px; border: none; border-radius: 8px; background: #0b3d91; color: #fff; cursor: pointer; }
      .btn:hover { background: #1553c4; }
      .btn.secondary { background: #eef2f7; color: #111; }
      .btn.secondary:hover { background: #e5e7eb; }
      
      /* -----------------------------------------------------------
	 RESULTS
      ----------------------------------------------------------- */
      .card {
	background: #f8fafc;
	border-radius: 12px;
	padding: 22px;
	margin-top: 18px;
	border: 1px solid #e3e6ea;
	transition: background 0.3s ease;
      }
      .card:hover { background: #f2f6fa; }
      
      .card h2,
      .card h3 { margin-bottom: 12px; color: #0b3d91; }
      
      .source {
	background: #fff;
	border-radius: 8px;
	padding: 12px;
	margin-top: 10px;
	border: 1px solid #e0e0e0;
	font-size: 0.95rem;
      }
      .score { font-size: 0.8rem; color: #777; }
      .meta { font-size: 0.85rem; color: #666; margin-top: 12px; }
      
      /* -----------------------------------------------------------
	 FOOTER
      ----------------------------------------------------------- */
      footer {
	text-align: center;
	margin-top: 40px;
	font-size: 0.85rem;
	color: #777;
      }
      
      /* -----------------------------------------------------------
	 AUTH HEADER (in-card)
      ----------------------------------------------------------- */
      .auth-row{
	display:flex; align-items:center; justify-content:space-between;
	margin-bottom:12px;
      }
      .auth-email{ font-weight:500; color:#374151; position:relative; top:-3px; } /* nudge up slightly */
      .hidden{ display:none !important; }
      
      .auth-right .btn,
      .auth-right .btn.secondary{
	min-width:96px; height:36px; padding:0 14px;
	display:inline-flex; align-items:center; justify-content:center;
	white-space:nowrap; font-weight:600;
      }
      .auth-right .btn + .btn{ margin-left:8px; }
      
      /* Lock the card while unauthenticated/redirecting */
      .container.locked{ filter: blur(1px); pointer-events: none; }
      
      /* Disabled inputs look disabled */
      textarea:disabled,
      input:disabled,
      select:disabled{
	background:#f3f4f6; color:#9ca3af; cursor:not-allowed;
      }
      
      /* -----------------------------------------------------------
	 OVERLAY
      ----------------------------------------------------------- */
      .overlay{
	position:fixed; inset:0; z-index:1000;
	background: rgba(255,255,255,0.7);
	display:none; align-items:center; justify-content:center;
	backdrop-filter: blur(2px);
      }
      .overlay:not(.hidden){ display:flex; }
      .overlay-card{
	background:#fff; border:1px solid #e5e7eb; border-radius:12px;
	padding:16px 20px; box-shadow:0 8px 24px rgba(0,0,0,0.06);
      }
      
      /* Tiny spinner */
      .spinner{
	width:16px; height:16px; border:2px solid #d1d5db; border-top-color:#0b3d91;
	border-radius:50%; margin:0 auto 10px; animation: spin 0.8s linear infinite;
      }
      @keyframes spin { to { transform: rotate(360deg); } }
      