/* Shared card shell — graph paper, decor, panels used by learning + problem. */

.am-card-shell {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 34px 38px;
  background-color: var(--am-surface);
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(19, 24, 27, 0.085) 24px),
    repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(19, 24, 27, 0.085) 24px);
  border: 2px solid color-mix(in srgb, var(--am-page) 72%, var(--am-ink));
  border-radius: var(--am-radius-card);
  box-shadow: var(--am-shadow-card);
  overflow: hidden;
}

/* Learning Card: same paper grid as LCW dome viewport (lines 20% softer). */
.am-learning-page .am-card-shell {
  --am-lc-paper: #fffef9;
  --am-lc-grid: rgba(26, 26, 26, 0.075);
  background-color: var(--am-lc-paper);
  background-image:
    linear-gradient(var(--am-lc-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--am-lc-grid) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 0 0;
  background-repeat: repeat, repeat;
  border-color: color-mix(in srgb, var(--am-lc-paper) 82%, #c8c5bc);
  box-shadow: 0 6px 22px rgba(19, 24, 27, 0.04);
}

.am-learning-page .am-card-shell__ambient-teal {
  opacity: 0.025;
}

.am-learning-page .am-card-shell__ambient-orange {
  opacity: 0.018;
}

.am-card-shell__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.am-card-shell__ambient-teal {
  position: absolute;
  top: -160px;
  right: -180px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: var(--am-primary);
  opacity: 0.04;
}

.am-card-shell__ambient-orange {
  position: absolute;
  bottom: -140px;
  left: -160px;
  width: 0;
  height: 0;
  border-left: 220px solid transparent;
  border-right: 220px solid transparent;
  border-bottom: 380px solid var(--am-accent);
  opacity: 0.03;
}

@media (max-width: 1280px) {
  .am-card-shell {
    padding: 22px 20px 24px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

@media (max-width: 640px) {
  .am-card-shell {
    padding: 14px 12px 18px;
  }
}

.am-card-decor {
  pointer-events: none;
}

.am-card-decor__cluster {
  position: absolute;
  top: 20px;
  right: 34px;
  width: 44px;
  height: 34px;
}

.am-card-decor__dot {
  position: absolute;
  border-radius: 50%;
}

.am-card-decor__sq {
  position: absolute;
  border-radius: 3px;
}

.am-card-decor__tri {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 9px solid var(--am-soft-accent);
}

.am-tag-pill {
  display: inline-block;
  font: 700 0.625rem/1 var(--am-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--am-soft-teal);
  color: var(--am-ink);
  padding: 5px 11px;
  border-radius: var(--am-radius-pill);
}

.am-meta {
  font: 500 0.6875rem/1 var(--am-font-mono);
  color: var(--am-ink);
  opacity: 0.5;
}

.am-section-label {
  font: 700 0.6875rem/1.2 var(--am-font-ui);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--am-ink);
  margin: 0 0 8px;
}

.am-panel-soft {
  background: var(--am-soft-teal);
  border-radius: var(--am-radius-md);
  padding: 16px 18px;
}

.am-panel-navy {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--am-navy);
  background-image: radial-gradient(circle at 92% 30%, rgba(248, 79, 26, 0.34), transparent 65%);
  border-radius: var(--am-radius-lg);
  color: var(--am-canvas);
}

.am-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.am-section-heading__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.am-section-heading__icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.am-section-heading .am-section-label {
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 0;
}

.am-panel-navy__label {
  font: 700 1.375rem/1.2 var(--am-font-ui);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--am-soft-teal);
}

.am-chip {
  display: inline-block;
  align-self: flex-start;
  font: 700 0.8125rem/1.2 var(--am-font-ui);
  color: var(--am-navy);
  background: var(--am-canvas);
  padding: 6px 14px;
  border-radius: var(--am-radius-pill);
}

.am-rule {
  height: 1px;
  margin: 0 0 34px;
  background: var(--am-border);
}

.am-icon-tile {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.am-icon-tile--sm {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.am-icon,
.am-icon-tile .am-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.am-icon svg,
.am-icon-tile svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--am-ink);
}

.am-icon-tile--teal { background: var(--am-soft-teal); }
.am-icon-tile--peach { background: var(--am-soft-accent); }
.am-icon-tile--yellow { background: var(--am-soft-yellow); }

.am-back {
  margin: 0 0 16px;
}

.am-back a {
  color: var(--am-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}

.am-back a:hover {
  color: var(--am-accent);
}

.am-admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--am-soft-yellow);
  border: 1.5px solid var(--am-border);
  border-radius: var(--am-radius-md);
  font-size: 0.8125rem;
}

.am-admin-bar code {
  font-family: var(--am-font-mono);
  font-size: 0.75rem;
}

.am-corner-mark {
  position: relative;
  display: inline-block;
  padding: 0 3px;
}

.am-corner-mark::before,
.am-corner-mark::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: var(--am-accent);
  border-style: solid;
}

.am-corner-mark::before {
  top: -2px;
  left: -2px;
  border-width: 2px 0 0 2px;
}

.am-corner-mark::after {
  bottom: -2px;
  right: -2px;
  border-width: 0 2px 2px 0;
}
