/* Character search page. */
* { box-sizing: border-box; }

.lookup-header {
  display: grid;
  gap: 7px;
}

.lookup-panel {
  padding: 18px 20px 20px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.28);
  background:
    linear-gradient(180deg, rgba(17, 29, 45, 0.95), rgba(9, 15, 24, 0.98)),
    var(--panel);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.lookup-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 850;
}

.lookup-field input {
  width: 100%;
  min-height: 42px;
  padding: 11px 12px;
  font-size: 14px;
}

.search-button {
  min-height: 42px;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
}

.search-button:disabled {
  cursor: wait;
  opacity: 0.74;
}

.hint-line {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.status-bar {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.status-step {
  min-height: 38px;
  padding: 8px 9px;
  border: 1px solid rgba(52, 78, 103, 0.82);
  border-radius: 7px;
  background: rgba(7, 17, 29, 0.72);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.step-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4b6073;
  flex: 0 0 auto;
}

.status-step.active {
  color: #dffbff;
  border-color: rgba(34, 211, 238, 0.72);
}

.status-step.active .status-dot {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.82);
}

.status-step.done {
  color: #c8fbff;
  border-color: rgba(45, 212, 191, 0.58);
}

.status-step.done .status-dot {
  background: #2dd4bf;
}

.message {
  display: none;
  margin-top: 12px;
  border: 1px solid rgba(251, 191, 36, 0.42);
  border-radius: 7px;
  padding: 10px 12px;
  background: rgba(251, 191, 36, 0.08);
  color: #ffe6ad;
  font-size: 12px;
  line-height: 1.45;
}

.message.show { display: block; }
.message.error {
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(255, 107, 107, 0.09);
  color: #ffd2d2;
}

.results-shell {
  display: none;
}

.results-shell.show {
  display: block;
}

.summary-band {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.26);
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.13), rgba(251, 191, 36, 0.07)),
    linear-gradient(180deg, rgba(14, 25, 39, 0.98), rgba(7, 13, 21, 0.98));
}

.summary-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.identity h2 {
  margin: 0;
  font-size: 27px !important;
  line-height: 1.02 !important;
  overflow-wrap: anywhere;
}

.identity-meta {
  margin-top: 6px;
  color: #a9c8d8;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
}

.status-pill {
  min-width: 96px;
  padding: 7px 10px;
  border: 1px solid rgba(45, 212, 191, 0.42);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.1);
  color: #bdf8ec;
  text-align: center;
  font-size: 11.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.offline {
  border-color: rgba(141, 164, 183, 0.36);
  background: rgba(141, 164, 183, 0.08);
  color: #b7c7d4;
}

.metric-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  min-height: 76px;
  padding: 11px 12px;
  border: 1px solid rgba(52, 78, 103, 0.86);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(18, 32, 48, 0.92), rgba(8, 15, 24, 0.95));
}

.metric-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  margin-top: 6px;
  color: #e9fbff;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 900;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.metric-detail {
  margin-top: 5px;
  color: #8da4b7;
  font-size: 11px;
  line-height: 1.35;
}

.content-grid {
  padding: 18px 20px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 14px;
}

.lookup-section {
  border: 1px solid rgba(52, 78, 103, 0.9);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(17, 29, 44, 0.94), rgba(8, 14, 23, 0.98));
  overflow: hidden;
}

.lookup-section.wide {
  grid-column: 1 / -1;
}

#xpSection {
  grid-column: 1 / -1;
}

.lookup-section h2 {
  margin: 0 !important;
  padding: 10px 12px 9px;
  border-bottom: 1px solid rgba(34, 211, 238, 0.28);
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.14), rgba(251, 191, 36, 0.06)),
    rgba(7, 17, 29, 0.82);
  font-size: 17px !important;
}

.section-body {
  padding: 12px;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.kv {
  min-height: 58px;
  border: 1px solid rgba(38, 57, 75, 0.92);
  border-radius: 6px;
  padding: 9px 10px;
  background: rgba(7, 17, 29, 0.54);
}

.kv .label {
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
}

.kv .value {
  margin-top: 5px;
  color: #edf9ff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.xp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 10px;
  align-items: stretch;
}

.xp-layout .kv-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.xp-progress-card {
  border: 1px solid rgba(82, 91, 101, 0.72);
  border-radius: 7px;
  padding: 12px;
  background: #181e24;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.xp-progress-compact {
  min-height: 58px;
  padding: 9px 10px;
}

.xp-progress-label {
  color: #f5ead6;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.entity-link {
  color: #f0c76f !important;
  font-weight: 900;
  text-decoration: none;
  border-bottom: 1px solid rgba(215, 170, 82, 0.38);
}

.entity-link:hover {
  color: #fff3cf !important;
  border-bottom-color: rgba(215, 170, 82, 0.82);
}

.progress-track {
  height: 10px;
  margin: 10px 0 5px;
  border-radius: 999px;
  background: #07111d;
  border: 1px solid rgba(49, 75, 99, 0.95);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22d3ee, #2dd4bf, #fbbf24);
}

.text-note {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.plain-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li,
.inline-row {
  border: 1px solid rgba(38, 57, 75, 0.92);
  border-radius: 6px;
  padding: 8px 9px;
  background: rgba(7, 17, 29, 0.52);
  color: #dff2fb;
  font-size: 12px;
  line-height: 1.42;
}

.inline-row strong {
  color: #e9fbff;
}

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.data-table th,
.data-table td {
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.data-table th:last-child,
.data-table td:last-child {
  text-align: right;
}

.rank-found {
  color: #2dd4bf;
  font-weight: 900;
}

.rank-missing {
  color: #8da4b7;
  font-weight: 800;
}

.guild-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin-bottom: 11px;
}

.guild-logo {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(52, 78, 103, 0.9);
  border-radius: 7px;
  background: #07111d;
  object-fit: contain;
  padding: 5px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.small-tag {
  padding: 5px 7px;
  border: 1px solid rgba(34, 211, 238, 0.36);
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.09);
  color: #c8fbff;
  font-size: 11px;
  font-weight: 800;
}

.comment-box {
  max-height: 170px;
  overflow: auto;
  white-space: pre-wrap;
  color: #cfe5f0;
  font-size: 12px;
  line-height: 1.5;
}

.source-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.source-grid a {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(34, 211, 238, 0.08);
  color: #c8fbff;
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 850;
}

.source-grid a:hover {
  border-color: rgba(45, 212, 191, 0.78);
  color: #ffffff;
}

.menu-list a.active {
  border-color: rgba(45, 212, 191, 0.72);
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.2), rgba(251, 191, 36, 0.08)),
    linear-gradient(180deg, #182a3d, #0f1b29);
  color: #ffffff !important;
}

.lookup-panel {
  border-bottom-color: rgba(82, 91, 101, 0.72);
  background: var(--panel-2);
}

.status-step {
  border-color: rgba(82, 91, 101, 0.72);
  background: #161b20;
  color: var(--muted);
}

.status-dot {
  background: #697176;
}

.status-step.active {
  color: #f7e7c1;
  border-color: rgba(215, 170, 82, 0.7);
  background: rgba(215, 170, 82, 0.09);
}

.status-step.active .status-dot {
  background: var(--accent);
  box-shadow: none;
}

.status-step.done {
  color: #d8f1ea;
  border-color: rgba(90, 140, 127, 0.62);
  background: rgba(90, 140, 127, 0.09);
}

.status-step.done .status-dot {
  background: #77c7b6;
}

.status-step.error {
  color: #ffd5d2;
  border-color: rgba(240, 111, 103, 0.58);
  background: rgba(240, 111, 103, 0.09);
}

.status-step.error .status-dot {
  background: var(--danger);
}

.summary-band {
  border-bottom-color: rgba(82, 91, 101, 0.72);
  background: #1f252b;
}

.identity-meta,
.metric-detail {
  color: #b9c0bf;
}

.status-pill {
  border-color: rgba(90, 140, 127, 0.52);
  background: rgba(90, 140, 127, 0.14);
  color: #d8f1ea;
}

.status-pill.offline {
  border-color: rgba(136, 143, 146, 0.38);
  background: rgba(136, 143, 146, 0.1);
  color: #c1c7c5;
}

.metric,
.lookup-section,
.kv,
.plain-list li,
.inline-row {
  border-color: rgba(82, 91, 101, 0.72);
  background: #181e24;
}

.lookup-section {
  background: #181e24;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.lookup-section h2 {
  border-bottom-color: rgba(82, 91, 101, 0.72);
  background: #222930;
  color: #f5ead6 !important;
}

.kv .value,
.inline-row strong {
  color: #f7f2e9;
}

.progress-track {
  background: #11161b;
  border-color: rgba(82, 91, 101, 0.78);
}

.progress-fill {
  background: linear-gradient(90deg, #5a8c7f, #d7aa52);
}

.small-tag,
.source-grid a {
  border-color: rgba(90, 140, 127, 0.48);
  background: rgba(90, 140, 127, 0.13);
  color: #d8f1ea;
}

.source-grid a:hover {
  border-color: rgba(215, 170, 82, 0.64);
  color: #fff8e8;
}

.menu-list a.active {
  border-color: rgba(215, 170, 82, 0.48);
  background: rgba(215, 170, 82, 0.1);
  color: #ffffff !important;
}

.section-loading {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed rgba(215, 170, 82, 0.38);
  border-radius: 7px;
  padding: 12px;
  background: rgba(215, 170, 82, 0.06);
  color: #f4ead7;
}

.ranking-progress {
  min-height: 58px;
  margin-top: 10px;
}

.section-loading strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
}

.section-loading span:last-child {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.loader {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid rgba(215, 170, 82, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.subheading {
  margin: 13px 0 8px;
  color: #f5ead6;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.data-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.rank-loading {
  color: #f0c76f;
  font-weight: 900;
}

.rank-error {
  color: var(--danger);
  font-weight: 900;
}

.rank-found {
  color: #77c7b6;
}

.history-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 12px;
  align-items: stretch;
}

.chart-card {
  min-height: 330px;
  border: 1px solid rgba(82, 91, 101, 0.72);
  border-radius: 7px;
  padding: 12px;
  background: #151b20;
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.chart-title {
  color: #f5ead6;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chart-subtitle,
.chart-period span {
  color: var(--muted);
  font-size: 11px;
}

.chart-subtitle {
  margin-top: 4px;
}

.chart-period {
  flex: 0 0 auto;
  display: grid;
  gap: 3px;
  text-align: right;
}

.chart-period strong {
  color: #f0c76f;
  font-size: 12px;
  line-height: 1.25;
}

.line-chart {
  width: 100%;
  height: auto;
  min-height: 250px;
  margin-top: 12px;
  display: block;
  overflow: visible;
}

.line-chart .chart-grid-line {
  stroke: rgba(136, 143, 146, 0.24);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.line-chart .chart-axis-line {
  stroke: rgba(136, 143, 146, 0.5);
  stroke-width: 1;
}

.line-chart .chart-line {
  fill: none;
  stroke: #d7aa52;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line-chart .chart-area {
  fill: url(#experience-area-gradient);
}

.line-chart .chart-axis-label {
  fill: #aeb7bc;
  font-size: 11px;
  font-weight: 750;
}

.line-chart .chart-axis-label-y {
  text-anchor: end;
}

.line-chart .chart-point {
  fill: #f7e0a4;
  stroke: #151b20;
  stroke-width: 2;
}

.line-chart .chart-point:hover,
.line-chart .chart-point:focus {
  fill: #ffffff;
  stroke: #d7aa52;
  stroke-width: 3;
  outline: none;
}

.history-side {
  display: grid;
  gap: 9px;
  align-content: start;
}

.history-table {
  margin-top: 12px;
}

.lookup-freshness {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.history-table td,
.monthly-history td {
  white-space: nowrap;
}

.history-table.is-collapsed tbody tr:nth-child(n+16) {
  display: none;
}

.rank-delta {
  margin-left: 4px;
  font-size: 10.5px;
  font-weight: 900;
}

.rank-delta.is-up { color: var(--hl-pos, #63d79c); }
.rank-delta.is-down { color: var(--hl-neg, #ff7d73); }

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.insight-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line-soft, rgba(124, 139, 145, 0.24));
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(35, 45, 51, 0.92), rgba(22, 30, 35, 0.96));
}

.comparison-card {
  border-color: rgba(99, 215, 156, 0.36);
}

.insight-title {
  color: #aebbb6;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.comparison-headline {
  color: #f2eee5;
  font-size: 14px;
  line-height: 1.45;
}

.comparison-headline strong {
  font-size: 18px;
}

.percentile-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.percentile-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d8ad57, #63d79c);
}

.comparison-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: #aebbb6;
  font-size: 12px;
}

.comparison-stats strong {
  color: #f2eee5;
}

.milestone-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #d8e0dc;
  font-size: 12.5px;
  line-height: 1.45;
}

.history-toggle {
  width: 100%;
  min-height: 38px !important;
  margin-top: 10px;
  border: 1px solid rgba(216, 173, 87, 0.34);
  background: rgba(216, 173, 87, 0.08);
  color: #fff2cd;
  font-weight: 850;
  cursor: pointer;
  box-shadow: none !important;
}

.history-toggle:hover {
  background: rgba(216, 173, 87, 0.16);
}

.monthly-history {
  margin-top: 4px;
  border-color: rgba(216, 173, 87, 0.36) !important;
}

.monthly-history td strong {
  color: #fff2cd;
}

.month-total {
  font-size: 14px;
}

.gain-bar-cell {
  background-image: linear-gradient(90deg, rgba(99, 215, 156, 0.16), rgba(99, 215, 156, 0.05));
  background-repeat: no-repeat;
  background-size: var(--gain-bar, 0%) 100%;
}

.month-status {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(124, 139, 145, 0.3);
  border-radius: 999px;
  color: #aeb8b5;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.month-status.is-current {
  border-color: rgba(127, 196, 255, 0.4);
  background: rgba(127, 196, 255, 0.1);
  color: #a9d7ff;
}

.month-status.is-complete {
  border-color: rgba(99, 215, 156, 0.4);
  background: rgba(99, 215, 156, 0.1);
  color: #8ff0c3;
}

.best-day-badge,
.level-up-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  vertical-align: 1px;
  white-space: nowrap;
}

.best-day-badge {
  background: linear-gradient(135deg, #ffe08a, #d9a640);
  color: #1d1606;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.level-up-badge {
  border: 1px solid rgba(99, 215, 156, 0.4);
  background: rgba(99, 215, 156, 0.12);
  color: #8ff0c3;
}

.level-up-badge.is-down {
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.12);
  color: #ff9a9a;
}

tr.is-best-day td {
  background-color: rgba(255, 213, 106, 0.07);
}

tr.is-idle-day td {
  opacity: 0.6;
}

.planning-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
}

.planning-hunts {
  display: grid;
  gap: 8px;
}

.planning-hunt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(82, 91, 101, 0.72);
  border-radius: 7px;
  padding: 10px;
  background: #181e24;
}

.planning-hunt strong {
  color: #f7f2e9;
  line-height: 1.25;
}

.planning-hunt-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.planning-hunt-score {
  color: #fff2cd;
  text-align: right;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}

.level-goal-card {
  border: 1px solid rgba(82, 91, 101, 0.72);
  border-radius: 7px;
  padding: 12px;
  background: #151b20;
}

.level-goal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.goal-result {
  width: 220px;
  min-width: 190px;
  max-width: 100%;
  color: #fff2cd;
  text-align: right;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.goal-result small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.goal-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #f5ead6;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.goal-field input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(82, 91, 101, 0.85);
  border-radius: 7px;
  padding: 9px 10px;
  background: #0f1418;
  color: #f7f2e9;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}

@media (max-width: 820px) {
  .search-row,
  .summary-top,
  .content-grid,
  .xp-layout,
  .history-layout,
  .planning-grid {
    grid-template-columns: 1fr;
  }

  .status-bar,
  .metric-grid,
  .kv-grid,
  .level-goal-header,
  .goal-form {
    grid-template-columns: 1fr 1fr;
  }

  .search-button {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .status-bar,
  .metric-grid,
  .kv-grid,
  .level-goal-header,
  .goal-form {
    grid-template-columns: 1fr;
  }

  .goal-result {
    min-width: 0;
    text-align: left;
  }

  .lookup-panel,
  .summary-band,
  .content-grid {
    padding-left: 14px;
    padding-right: 14px;
  }

  .identity h2 {
    font-size: 23px !important;
  }

  .chart-header {
    display: grid;
    gap: 8px;
  }

  .chart-period {
    text-align: left;
  }

  .line-chart {
    min-height: 220px;
  }
}
