*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --yellow: #ffcc00;
  --yellow-dark: #f0bc00;
  --bg: #f5f5f5;
  --card-bg: #ffffff;
  --border: 1px solid #e8e8e8;
  --radius: 12px;
  --radius-sm: 8px;
  --text: #1a1a1a;
  --text-muted: #888;
  --text-light: #aaa;
  --green: #1a9e1a;
  --red: #cc2200;
  --gap: 16px;
  --fs: 13px;
  --sidebar-w: 188px;
}

body {
  background: var(--bg);
  font-family: Arial, sans-serif;
  font-size: var(--fs);
  color: var(--text);
  min-height: 100vh;
}

a { color: #0d47a1; text-decoration: none; }
a:hover { text-decoration: underline; }

.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

/* ── HEADER ── */
.header {
  display: flex;
  align-items: center;
  gap: var(--gap);
  margin-bottom: var(--gap);
}
.header .logo {
  text-align: center;
}

.logo {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  width: var(--sidebar-w);
  align-self: center;
  text-align: center;
  /* vertically aligned to search bar via flex align-items */
}

.header-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── RSS strip ── */
.rss-strip {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.rss-strip .rss-label {
  font-weight: bold;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  padding-top: 1px;
}
.rss-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rss-items a {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rss-sep { display: none; }

/* ── SEARCH ── */
.search-bar {
  display: flex;
  align-items: stretch;
  background: var(--yellow);
  border-radius: var(--radius);
  overflow: visible;
  position: relative;
  box-shadow: 0 2px 8px rgba(255,200,0,0.3);
}

.search-bar input[type="text"] {
  flex: 1;
  border: none;
  background: white;
  padding: 0 16px;
  font-size: 16px;
  height: 54px;
  outline: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text);
}

.search-bar button {
  background: var(--yellow);
  border: none;
  padding: 0 24px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  color: var(--text);
  height: 54px;
  white-space: nowrap;
  transition: background 0.15s;
}
.search-bar button:hover { background: var(--yellow-dark); }

/* triangle */
.search-bar::after {
  content: '';
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 27px solid transparent;
  border-bottom: 27px solid transparent;
  border-left: 19px solid var(--yellow);
}

/* nav tabs */
.search-nav {
  display: flex;
  gap: 20px;
  padding: 0 2px;
}
.search-nav a {
  font-size: 13px;
  color: var(--text-muted);
}
.search-nav a:hover { color: var(--text); text-decoration: none; }

/* ── MAIN LAYOUT ── */
.main-layout {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  align-self: flex-start;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

/* ── CARDS ── */
.card {
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.card-title {
  font-size: 12px;
  font-weight: bold;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ── MAIL BLOCK ── */
.mail-block {
  display: flex;
  flex-direction: column;
}
.mail-block .mail-links { margin-top: 10px; }
.mail-block input[type="text"],
.mail-block input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs);
  background: #fafafa;
  outline: none;
  transition: border-color 0.15s;
}
.mail-block input:focus { border-color: #aaa; background: #fff; }
.mail-block .remember {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.mail-block input[type="submit"] {
  width: 100%;
  padding: 8px;
  background: var(--yellow);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: bold;
  font-size: var(--fs);
  cursor: pointer;
  transition: background 0.15s;
}
.mail-block input[type="submit"]:hover { background: var(--yellow-dark); }
.mail-block .mail-links {
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
}

/* city bar */
.city-bar {
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.city-bar a { color: var(--text-muted); font-size: 11px; }
.city-input-wrap { display: none; margin-top: 6px; }
.city-input-wrap input {
  width: 100%;
  padding: 6px 8px;
  border: var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  outline: none;
}

/* ── WIDGETS ROW ── */
.widgets-row {
  display: flex;
  gap: var(--gap);
}
.widgets-row .card {
  flex: 1;
}

/* ── WEATHER ── */
#weather-loading { font-size: 12px; color: var(--text-light); }

.weather-today {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.weather-icon-big { font-size: 40px; line-height: 1; margin-top: 2px; }
.weather-main-temp { font-size: 32px; font-weight: bold; line-height: 1; }
.weather-desc { font-size: 12px; color: #555; margin-top: 5px; }

.weather-hourly {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: var(--border);
  margin-top: 4px;
}
.weather-h-item {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
}
.weather-h-item .h-icon { font-size: 18px; margin-bottom: 2px; }
.weather-h-item .h-temp { font-weight: bold; color: var(--text); font-size: 12px; }
.weather-h-item .h-time { color: var(--text-light); margin-top: 1px; }

.weather-forecast {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding-top: 10px;
  border-top: var(--border);
  margin-top: 10px;
}
.forecast-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  flex: 1;
}
.forecast-day { color: var(--text-muted); flex-shrink: 0; }
.forecast-icon { font-size: 15px; }
.forecast-temp { font-weight: bold; }
.forecast-desc { color: #666; font-size: 11px; }

/* ── QUOTES ── */
.quotes-inner { position: relative; min-height: 120px; }
.quotes-panel {
  position: absolute;
  top: 0; left: 0; right: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.quotes-panel.active { opacity: 1; pointer-events: auto; position: relative; }

.quotes-date { font-size: 11px; color: var(--text-light); font-weight: normal; margin-left: 4px; }

.q-table { width: 100%; border-collapse: collapse; }
.q-table td { padding: 4px 0; font-size: 12px; }
.q-table .q-name { color: var(--text); }
.q-table .q-val { text-align: right; font-weight: bold; padding-right: 8px; }
.q-table .q-chg { text-align: right; font-size: 11px; white-space: nowrap; }
.q-pos { color: var(--green); }
.q-neg { color: var(--red); }

.quotes-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 10px;
}
.q-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: background 0.2s;
}
.q-dot.active { background: var(--yellow-dark); }

/* ── INTERESTING ── */
.interesting-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.interesting-col h3 {
  font-size: 12px;
  font-weight: bold;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.interesting-col ul { list-style: none; }
.interesting-col li { margin-bottom: 7px; }
.interesting-col a { font-size: 13px; color: var(--text); line-height: 1.35; }
.interesting-col a:hover { color: #0d47a1; text-decoration: none; }

/* ── FOOTER ── */
.footer {
  text-align: center;
  margin-top: 32px;
  font-size: 11px;
  color: var(--text-light);
}
.footer a { color: var(--text-light); }